Skip to content

Commit

Permalink
test: Exclude warmup datapoints from A/B-Test
Browse files Browse the repository at this point in the history
The raw time series emitted from iperf3 include data points from the
warmup period. Since we do our A/B-Test on this entire time series, we
should exclude them.

Signed-off-by: Patrick Roy <[email protected]>
  • Loading branch information
roypat committed Oct 2, 2023
1 parent b467c79 commit cd27794
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/framework/utils_iperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,23 @@ def consume_iperf3_output(stats_consumer, iperf_result):
]


def emit_iperf3_metrics(metrics, iperf_result):
def emit_iperf3_metrics(metrics, iperf_result, omit):
"""Consume the iperf3 data produced by the tcp/vsock throughput performance tests"""
for cpu_util_data_point in list(
iperf_result["cpu_load_raw"]["firecracker"].values()
)[0]:
metrics.put_metric("cpu_utilization_vmm", cpu_util_data_point, "Percent")

for time_series in iperf_result["g2h"]:
for interval in time_series["intervals"]:
for interval in time_series["intervals"][omit:]:
metrics.put_metric(
"throughput_guest_to_host",
interval["sum"]["bits_per_second"],
"Bits/Second",
)

for time_series in iperf_result["h2g"]:
for interval in time_series["intervals"]:
for interval in time_series["intervals"][omit:]:
metrics.put_metric(
"throughput_host_to_guest",
interval["sum"]["bits_per_second"],
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/performance/test_network_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ def test_network_tcp_throughput(
}
)

emit_iperf3_metrics(metrics, data)
emit_iperf3_metrics(metrics, data, TCPIPerf3Test.WARMUP_SEC)
2 changes: 1 addition & 1 deletion tests/integration_tests/performance/test_vsock_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ def test_vsock_throughput(
}
)

emit_iperf3_metrics(metrics, data)
emit_iperf3_metrics(metrics, data, VsockIPerf3Test.WARMUP_SEC)

0 comments on commit cd27794

Please sign in to comment.