Skip to content

Commit c335476

Browse files
committed
feat: save network perf tests data
Save logs and json files for network perf tests. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent 22f0338 commit c335476

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/integration_tests/performance/test_network_ab.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# SPDX-License-Identifier: Apache-2.0
33
"""Tests the network latency of a Firecracker guest."""
44

5+
import json
56
import re
7+
from pathlib import Path
68

79
import pytest
810

@@ -95,6 +97,7 @@ def test_network_tcp_throughput(
9597
payload_length,
9698
mode,
9799
metrics,
100+
results_dir,
98101
):
99102
"""
100103
Iperf between guest and host in both directions for TCP workload.
@@ -133,4 +136,13 @@ def test_network_tcp_throughput(
133136
)
134137
data = test.run_test(network_microvm.vcpus_count + 2)
135138

139+
for i, g2h in enumerate(data["g2h"]):
140+
Path(results_dir / f"g2h_{i}.json").write_text(
141+
json.dumps(g2h), encoding="utf-8"
142+
)
143+
for i, h2g in enumerate(data["h2g"]):
144+
Path(results_dir / f"h2g_{i}.json").write_text(
145+
json.dumps(h2g), encoding="utf-8"
146+
)
147+
136148
emit_iperf3_metrics(metrics, data, warmup_sec)

0 commit comments

Comments
 (0)