Skip to content

Commit 86afedb

Browse files
committed
feat(tests/startup): turn the test into an A/B perf test
Turn the startup performance test into A/B and increase the number of iterations to avoid false positives. Signed-off-by: Riccardo Mancini <[email protected]>
1 parent 791a266 commit 86afedb

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.buildkite/pipeline_perf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@
6565
"tests": "integration_tests/performance/test_boottime.py::test_boottime",
6666
"devtool_opts": "-c 1-10 -m 0",
6767
},
68+
"process-startup": {
69+
"label": "process-startup",
70+
"tests": "integration_tests/performance/test_process_startup_time.py",
71+
"devtool_opts": "-c 1-10 -m 0",
72+
},
6873
"jailer": {
6974
"label": "jailer",
7075
"tests": "integration_tests/performance/test_jailer.py",

tests/integration_tests/performance/test_process_startup_time.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,46 @@
55
import os
66
import time
77

8+
import pytest
9+
810
from host_tools.cargo_build import run_seccompiler_bin
911

12+
ITERATIONS = 100
13+
1014

15+
@pytest.mark.nonci
1116
def test_startup_time_new_pid_ns(
1217
microvm_factory, guest_kernel_linux_5_10, rootfs, metrics
1318
):
1419
"""
1520
Check startup time when jailer is spawned in a new PID namespace.
1621
"""
17-
for _ in range(10):
22+
for _ in range(ITERATIONS):
1823
microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs)
1924
microvm.jailer.new_pid_ns = True
2025
_test_startup_time(microvm, metrics, "new_pid_ns")
2126

2227

28+
@pytest.mark.nonci
2329
def test_startup_time_daemonize(
2430
microvm_factory, guest_kernel_linux_5_10, rootfs, metrics
2531
):
2632
"""
2733
Check startup time when jailer detaches Firecracker from the controlling terminal.
2834
"""
29-
for _ in range(10):
35+
for _ in range(ITERATIONS):
3036
microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs)
3137
_test_startup_time(microvm, metrics, "daemonize")
3238

3339

40+
@pytest.mark.nonci
3441
def test_startup_time_custom_seccomp(
3542
microvm_factory, guest_kernel_linux_5_10, rootfs, metrics
3643
):
3744
"""
3845
Check the startup time when using custom seccomp filters.
3946
"""
40-
for _ in range(10):
47+
for _ in range(ITERATIONS):
4148
microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs)
4249
_custom_filter_setup(microvm)
4350
_test_startup_time(microvm, metrics, "custom_seccomp")

0 commit comments

Comments
 (0)