From c3108e1d15a7869bc654701331f2dfca2371dc42 Mon Sep 17 00:00:00 2001 From: Virendra Kakade Date: Wed, 16 Mar 2022 15:08:20 -0500 Subject: test: add support for new benchmark_rate args Add support for the new "priority" and "multi_streamer" benchmark_rate args to run_benchmark_rate.py to enable batch runs of benchmark_rate using those arguments. Signed-off-by: Virendra Kakade --- .../streaming_performance/parse_benchmark_rate.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'host/tests/streaming_performance/parse_benchmark_rate.py') diff --git a/host/tests/streaming_performance/parse_benchmark_rate.py b/host/tests/streaming_performance/parse_benchmark_rate.py index e30c3e6aa..f7fde629d 100644 --- a/host/tests/streaming_performance/parse_benchmark_rate.py +++ b/host/tests/streaming_performance/parse_benchmark_rate.py @@ -72,18 +72,20 @@ def parse(result_str): rx_rate = 0.0 num_rx_channels = 0 expr = "Testing receive rate ([0-9]+\.[0-9]+) Msps on (\d+) channels" - match = re.search(expr, result_str) - if match is not None: - rx_rate = float(match.group(1)) * 1.0e6 - num_rx_channels = int(match.group(2)) + matches = re.findall(expr, result_str) + if matches: + rx_rate = float(matches[0][0]) * 1.0e6 + for match in matches: + num_rx_channels += int(match[1]) tx_rate = 0.0 num_tx_channels = 0 expr = "Testing transmit rate ([0-9]+\.[0-9]+) Msps on (\d+) channels" - match = re.search(expr, result_str) - if match is not None: - tx_rate = float(match.group(1)) * 1.0e6 - num_tx_channels = int(match.group(2)) + matches = re.findall(expr, result_str) + if matches: + tx_rate = float(matches[0][0]) * 1.0e6 + for match in matches: + num_tx_channels += int(match[1]) # Parse results expr = "Benchmark rate summary:" -- cgit v1.2.3