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 11
11
import pytest
12
12
13
13
import host_tools .drive as drive_tools
14
- from framework .microvm import HugePagesConfig , Microvm
14
+ from framework .microvm import HugePagesConfig , Microvm , SnapshotType
15
15
16
16
USEC_IN_MSEC = 1000
17
17
NS_IN_MSEC = 1_000_000
@@ -257,21 +257,30 @@ def test_snapshot_create_latency(
257
257
guest_kernel_linux_5_10 ,
258
258
rootfs ,
259
259
metrics ,
260
+ snapshot_type ,
260
261
):
261
262
"""Measure the latency of creating a Full snapshot"""
262
263
263
264
vm = microvm_factory .build (guest_kernel_linux_5_10 , rootfs , monitor_memory = False )
264
265
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
+ )
266
271
vm .start ()
267
272
vm .pin_threads (0 )
268
273
269
274
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
+ }
271
280
)
272
281
273
282
for _ in range (ITERATIONS ):
274
- vm .snapshot_full ( )
283
+ vm .make_snapshot ( snapshot_type )
275
284
fc_metrics = vm .flush_metrics ()
276
285
277
286
value = fc_metrics ["latencies_us" ]["full_create_snapshot" ] / USEC_IN_MSEC
You can’t perform that action at this time.
0 commit comments