From 7d3c5fca063a1f1e44154d4d58012a3abdabb51f Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Fri, 17 Nov 2023 22:00:43 +0000 Subject: [PATCH] wip: fix more tests to include the integer parameter --- mlos_bench/mlos_bench/tests/optimizers/mock_opt_test.py | 4 ++++ .../mlos_bench/tests/optimizers/opt_bulk_register_test.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mlos_bench/mlos_bench/tests/optimizers/mock_opt_test.py b/mlos_bench/mlos_bench/tests/optimizers/mock_opt_test.py index 5f186d4596f..7617cf8efd0 100644 --- a/mlos_bench/mlos_bench/tests/optimizers/mock_opt_test.py +++ b/mlos_bench/mlos_bench/tests/optimizers/mock_opt_test.py @@ -21,18 +21,21 @@ def mock_configurations_no_defaults() -> list: """ return [ ({ + "123": 2, "vmSize": "Standard_B4ms", "idle": "halt", "kernel_sched_migration_cost_ns": 13111, "kernel_sched_latency_ns": 796233790, }, 88.88), ({ + "123": 3, "vmSize": "Standard_B2ms", "idle": "halt", "kernel_sched_migration_cost_ns": 117025, "kernel_sched_latency_ns": 149827706, }, 66.66), ({ + "123": 1, "vmSize": "Standard_B4ms", "idle": "halt", "kernel_sched_migration_cost_ns": 354784, @@ -48,6 +51,7 @@ def mock_configurations(mock_configurations_no_defaults: list) -> list: """ return [ ({ + "123": 2, "vmSize": "Standard_B4ms", "idle": "halt", "kernel_sched_migration_cost_ns": -1, diff --git a/mlos_bench/mlos_bench/tests/optimizers/opt_bulk_register_test.py b/mlos_bench/mlos_bench/tests/optimizers/opt_bulk_register_test.py index e9967776955..71619224006 100644 --- a/mlos_bench/mlos_bench/tests/optimizers/opt_bulk_register_test.py +++ b/mlos_bench/mlos_bench/tests/optimizers/opt_bulk_register_test.py @@ -25,24 +25,28 @@ def mock_configs() -> List[dict]: """ return [ { + '123': 2, 'vmSize': 'Standard_B4ms', 'idle': 'halt', 'kernel_sched_migration_cost_ns': 50000, 'kernel_sched_latency_ns': 1000000, }, { + '123': 1, 'vmSize': 'Standard_B4ms', 'idle': 'halt', 'kernel_sched_migration_cost_ns': 40000, 'kernel_sched_latency_ns': 2000000, }, { + '123': 3, 'vmSize': 'Standard_B4ms', 'idle': 'mwait', 'kernel_sched_migration_cost_ns': 100000, 'kernel_sched_latency_ns': 3000000, }, { + '123': 2, 'vmSize': 'Standard_B2s', 'idle': 'mwait', 'kernel_sched_migration_cost_ns': 200000, @@ -109,7 +113,8 @@ def _test_opt_update_max(opt: Optimizer, configs: List[dict], "vmSize": "Standard_B2s", "idle": "mwait", "kernel_sched_migration_cost_ns": 200000, - 'kernel_sched_latency_ns': 4000000, + "kernel_sched_latency_ns": 4000000, + "123": 2, }