Skip to content

Commit 49db07b

Browse files
Sudan Landgewearyzen
authored andcommitted
chore: udpate sample_latency to use FCMetricsMonitor
FCMetricsMonitor class relies on `microvm` having a valid `kernel_file` to set guest kernel dimensions. sample_latency test restores microvm from snapshot so it didn't need to have a guest kernel passed while building microvm object. Passing guest kernel shouldn't affect the restore test but it will help FCMetricsMonitor to get the right guest kernel version so, update `sample_latency` to pass guest kernel while building the microvm. Signed-off-by: Sudan Landge <sudanl@amazon.com>
1 parent 6f16d70 commit 49db07b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration_tests/performance/test_snapshot_ab.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,15 @@ def configure_vm(
7777

7878
return vm
7979

80-
def sample_latency(self, microvm_factory, snapshot) -> List[float]:
80+
def sample_latency(
81+
self, microvm_factory, snapshot, guest_kernel_linux_4_14
82+
) -> List[float]:
8183
"""Collects latency samples for the microvm configuration specified by this instance"""
8284
values = []
8385

8486
for _ in range(ITERATIONS):
8587
microvm = microvm_factory.build(
88+
kernel=guest_kernel_linux_4_14,
8689
monitor_memory=False,
8790
)
8891
microvm.spawn()
@@ -162,6 +165,7 @@ def test_restore_latency(
162165
samples = test_setup.sample_latency(
163166
microvm_factory,
164167
snapshot,
168+
guest_kernel_linux_4_14,
165169
)
166170

167171
for sample in samples:

0 commit comments

Comments
 (0)