Skip to content

Commit 809b8cf

Browse files
authored
Merge branch 'main' into mmds_accept
2 parents 2126f95 + 343b0ab commit 809b8cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/integration_tests/performance/test_network.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from framework.utils_iperf import IPerf3Test, emit_iperf3_metrics
1212

1313

14-
def consume_ping_output(ping_putput, request_per_round):
14+
def consume_ping_output(ping_putput):
1515
"""Consume ping output.
1616
1717
Output example:
@@ -29,12 +29,12 @@ def consume_ping_output(ping_putput, request_per_round):
2929
assert len(output) > 2
3030

3131
# Compute percentiles.
32-
seqs = output[1 : request_per_round + 1]
3332
pattern_time = ".+ bytes from .+: icmp_seq=.+ ttl=.+ time=(.+) ms"
34-
for seq in seqs:
33+
for seq in output:
3534
time = re.findall(pattern_time, seq)
36-
assert len(time) == 1
37-
yield float(time[0])
35+
if time:
36+
assert len(time) == 1
37+
yield float(time[0])
3838

3939

4040
@pytest.fixture
@@ -81,7 +81,7 @@ def test_network_latency(network_microvm, metrics):
8181
f"ping -c {request_per_round} -i {delay} {host_ip}"
8282
)
8383

84-
samples.extend(consume_ping_output(ping_output, request_per_round))
84+
samples.extend(consume_ping_output(ping_output))
8585

8686
for sample in samples:
8787
metrics.put_metric("ping_latency", sample, "Milliseconds")

0 commit comments

Comments
 (0)