File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
tests/integration_tests/performance Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1111import pytest
1212
1313import host_tools .drive as drive_tools
14- from framework .microvm import HugePagesConfig , Microvm
14+ from framework .microvm import HugePagesConfig , Microvm , SnapshotType
1515
1616USEC_IN_MSEC = 1000
1717NS_IN_MSEC = 1_000_000
@@ -257,21 +257,30 @@ def test_snapshot_create_latency(
257257 guest_kernel_linux_5_10 ,
258258 rootfs ,
259259 metrics ,
260+ snapshot_type ,
260261):
261262 """Measure the latency of creating a Full snapshot"""
262263
263264 vm = microvm_factory .build (guest_kernel_linux_5_10 , rootfs , monitor_memory = False )
264265 vm .spawn ()
265- vm .basic_config (vcpu_count = 2 , mem_size_mib = 512 )
266+ vm .basic_config (
267+ vcpu_count = 2 ,
268+ mem_size_mib = 512 ,
269+ track_dirty_pages = snapshot_type == SnapshotType .DIFF ,
270+ )
266271 vm .start ()
267272 vm .pin_threads (0 )
268273
269274 metrics .set_dimensions (
270- {** vm .dimensions , "performance_test" : "test_snapshot_create_latency" }
275+ {
276+ ** vm .dimensions ,
277+ "performance_test" : "test_snapshot_create_latency" ,
278+ "snapshot_type" : snapshot_type .value ,
279+ }
271280 )
272281
273282 for _ in range (ITERATIONS ):
274- vm .snapshot_full ( )
283+ vm .make_snapshot ( snapshot_type )
275284 fc_metrics = vm .flush_metrics ()
276285
277286 value = fc_metrics ["latencies_us" ]["full_create_snapshot" ] / USEC_IN_MSEC
You can’t perform that action at this time.
0 commit comments