@@ -353,80 +353,3 @@ def test_snapshot_create_latency(
353
353
st_core .add_pipe (producer = prod , consumer = cons , tag = microvm_cfg )
354
354
# Gather results and verify pass criteria.
355
355
st_core .run_exercise ()
356
-
357
-
358
- @pytest .mark .parametrize ("guest_mem_mib" , [256 , 512 ])
359
- def test_snapshot_resume_latency (
360
- microvm_factory ,
361
- guest_kernel ,
362
- rootfs ,
363
- guest_mem_mib ,
364
- io_engine ,
365
- st_core ,
366
- bin_cloner_path ,
367
- ):
368
- """
369
- Test scenario: Snapshot load performance measurement.
370
-
371
- Testing matrix:
372
- - Guest kernel: All supported ones
373
- - Rootfs: Ubuntu 18.04
374
- - Microvm: 2vCPU with 256/512 MB RAM
375
- TODO: Multiple microvm sizes must be tested in the async pipeline.
376
- """
377
- logger = logging .getLogger ("snapshot_load" )
378
- vcpus = 2
379
- microvm_cfg = f"{ vcpus } vcpu_{ guest_mem_mib } mb.json"
380
- vm = microvm_factory .build (guest_kernel , rootfs , monitor_memory = False )
381
- vm .spawn (use_ramdisk = True )
382
- vm .basic_config (
383
- vcpu_count = vcpus ,
384
- mem_size_mib = guest_mem_mib ,
385
- use_initrd = True ,
386
- rootfs_io_engine = io_engine ,
387
- )
388
- iface = NetIfaceConfig ()
389
- vm .add_net_iface (iface )
390
- vm .start ()
391
- # Check if guest works.
392
- exit_code , _ , _ = vm .ssh .execute_command ("ls" )
393
- assert exit_code == 0
394
-
395
- # Create a snapshot builder from a microvm.
396
- snapshot_builder = SnapshotBuilder (vm )
397
- disks = [vm .rootfs_file ]
398
- snapshot = snapshot_builder .create (
399
- disks , rootfs .ssh_key (), use_ramdisk = True , net_ifaces = [iface ]
400
- )
401
- vm .kill ()
402
-
403
- st_core .name = "snapshot_resume_latency"
404
- st_core .iterations = SAMPLE_COUNT
405
- st_core .custom ["guest_config" ] = microvm_cfg .strip (".json" )
406
- st_core .custom ["io_engine" ] = io_engine
407
- st_core .custom ["snapshot_type" ] = "FULL"
408
-
409
- prod = producer .LambdaProducer (
410
- func = snapshot_resume_producer ,
411
- func_kwargs = {
412
- "logger" : logger ,
413
- "vm_builder" : MicrovmBuilder (bin_cloner_path ),
414
- "snapshot" : snapshot ,
415
- "use_ramdisk" : True ,
416
- },
417
- )
418
-
419
- cons = consumer .LambdaConsumer (
420
- func = lambda cons , result : cons .consume_stat (
421
- st_name = "max" , ms_name = "latency" , value = result
422
- ),
423
- func_kwargs = {},
424
- )
425
- eager_map (
426
- cons .set_measurement_def ,
427
- snapshot_resume_measurements (microvm_cfg , io_engine .lower ()),
428
- )
429
-
430
- st_core .add_pipe (producer = prod , consumer = cons , tag = microvm_cfg )
431
- # Gather results and verify pass criteria.
432
- st_core .run_exercise ()
0 commit comments