summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-04-28 13:49:24 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-04-28 13:49:24 +0300
commit798efac6db9d057073dae13b818815422ae926cc (patch)
tree10e5db5a108ebee06cef65b625eb6dfdef1f540d /scripts/automation/regression/stateless_tests/stl_benchmark_test.py
parent01f0f25ca3072a5f671c5dfbaae454a94414c64d (diff)
regression: slight fix to stl benchmark test
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()
+
+