File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
tests/integration_tests/performance Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1111from 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" )
You can’t perform that action at this time.
0 commit comments