diff options
-rw-r--r-- | host/tests/streaming_performance/parse_benchmark_rate.py | 18 | ||||
-rw-r--r-- | host/tests/streaming_performance/run_benchmark_rate.py | 2 |
2 files changed, 12 insertions, 8 deletions
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:"
diff --git a/host/tests/streaming_performance/run_benchmark_rate.py b/host/tests/streaming_performance/run_benchmark_rate.py index 1989b6d92..141dc5dc3 100644 --- a/host/tests/streaming_performance/run_benchmark_rate.py +++ b/host/tests/streaming_performance/run_benchmark_rate.py @@ -40,6 +40,8 @@ def create_parser(): parser.add_argument("--random", type=str, help="Run with random values of samples in send() and recv()") parser.add_argument("--rx_channels", type=str, help="which RX channel(s) to use") parser.add_argument("--tx_channels", type=str, help="which TX channel(s) to use") + parser.add_argument("--priority", type=str, help="thread priority (normal, high)") + parser.add_argument("--multi_streamer", action="count", help="create a separate streamer per channel") return parser def parse_args(): |