def snapshot_resume_measurements(vm_type): """Define measurements for snapshot resume tests.""" latency = types.MeasurementDef.create_measurement( "latency", "ms", [function.Max("max")], { "max": criteria.LowerThan( LOAD_LATENCY_BASELINES[platform.machine()][vm_type]) }) return [latency]
def snapshot_create_measurements(vm_type, snapshot_type): """Define measurements for snapshot create tests.""" latency = types.MeasurementDef.create_measurement( "latency", "ms", [function.Max("max")], { "max": criteria.LowerThan( CREATE_LATENCY_BASELINES[platform.machine()][vm_type] ['FULL' if snapshot_type == SnapshotType.FULL else 'DIFF']) }) return [latency]
def snapshot_resume_measurements(vm_type): """Define measurements for snapshot resume tests.""" load_latency = LOAD_LATENCY_BASELINES[platform.machine()][vm_type] # Host kernels >= 5.4 add an up to ~30ms latency. # See: https://github.com/firecracker-microvm/firecracker/issues/2129 linux_version = platform.release() for idx, char in enumerate(linux_version): if not char.isdigit() and char != '.': linux_version = linux_version[0:idx] break if compare_versions(linux_version, "5.4.0") > 0: load_latency["target"] += 30 latency = types.MeasurementDef.create_measurement( "latency", "ms", [function.Max("max")], {"max": criteria.LowerThan(load_latency)}) return [latency]
def snapshot_resume_measurements(vm_type): """Define measurements for snapshot resume tests.""" load_latency = LOAD_LATENCY_BASELINES[platform.machine()][vm_type] if is_io_uring_supported(): # There is added latency caused by the io_uring syscalls used by the # block device. load_latency["target"] += 115 if compare_versions(get_kernel_version(), "5.4.0") > 0: # Host kernels >= 5.4 add an up to ~30ms latency. # See: https://github.com/firecracker-microvm/firecracker/issues/2129 load_latency["target"] += 30 latency = types.MeasurementDef.create_measurement( "latency", "ms", [function.Max("max")], {"max": criteria.LowerThan(load_latency)}) return [latency]