diff options
author | Virendra Kakade <virendra.kakade@ni.com> | 2022-03-16 15:08:20 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-03-23 16:14:55 -0500 |
commit | c3108e1d15a7869bc654701331f2dfca2371dc42 (patch) | |
tree | 701496bbb72ec8cbdfab47dd238b1304b77a4c76 /host/tests | |
parent | ecb49902970b94c836a41af6430832a2de7f075d (diff) | |
download | uhd-c3108e1d15a7869bc654701331f2dfca2371dc42.tar.gz uhd-c3108e1d15a7869bc654701331f2dfca2371dc42.tar.bz2 uhd-c3108e1d15a7869bc654701331f2dfca2371dc42.zip |
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 <virendra.kakade@ni.com>
Diffstat (limited to 'host/tests')
-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(): |