Skip to content

Commit

Permalink
chore: udpate sample_latency to use FCMetricsMonitor
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Sudan Landge committed Jan 24, 2024
1 parent f110164 commit 78f337c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/integration_tests/performance/test_snapshot_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ def configure_vm(

return vm

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

for _ in range(ITERATIONS):
microvm = microvm_factory.build(
kernel=guest_kernel_linux_4_14,
monitor_memory=False,
)
microvm.spawn()
Expand Down Expand Up @@ -162,6 +163,7 @@ def test_restore_latency(
samples = test_setup.sample_latency(
microvm_factory,
snapshot,
guest_kernel_linux_4_14,
)

for sample in samples:
Expand Down

0 comments on commit 78f337c

Please sign in to comment.