summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/regression/stateless_tests/stl_benchmark_test.py')
-rwxr-xr-xscripts/automation/regression/stateless_tests/stl_benchmark_test.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_benchmark_test.py b/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
index d4cf4a05..258717dc 100755
--- a/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
@@ -41,8 +41,11 @@ class STLBenchmark_Test(CStlGeneral_Test):
raise Exception('CPU util is zero, last values: %s' % cpu_utils)
if not stats['global']['tx_bps']:
raise Exception('TX bps is zero: %s' % stats['global']['tx_bps'])
-
- bw_per_core = 100 * stats['global']['tx_bps'] / cpu_utils[-1] / 1e6
+ bw_per_core = 2 * 2 * 100 * stats['global']['tx_bps'] / (cpu_utils[-1] * self.stl_trex.get_port_count() * 1e6)
print('Done (%ss), CPU util: %4g, bw_per_core: %6sMb/core' % (int(time() - start_time), cpu_utils[-1], int(bw_per_core)))
# TODO: add check of benchmark based on results from regression
+ self.stl_trex.reset()
+ self.stl_trex.clear_stats()
+
+