diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/automation/regression/stateless_tests/stl_benchmark_test.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_benchmark_test.py b/scripts/automation/regression/stateless_tests/stl_benchmark_test.py index 65efa55e..097006e0 100755 --- a/scripts/automation/regression/stateless_tests/stl_benchmark_test.py +++ b/scripts/automation/regression/stateless_tests/stl_benchmark_test.py @@ -16,7 +16,7 @@ class STLBenchmark_Test(CStlGeneral_Test): cpu_utils = deque([0] * stabilize, maxlen = stabilize) kwargs = profile_bench.get('kwargs', {}) print('Testing profile %s, kwargs: %s' % (profile_bench['name'], kwargs)) - profile = STLProfile.load(os.path.join(CTRexScenario.scripts_path, profile_bench['name']), port_id = 0, **kwargs) + profile = STLProfile.load(os.path.join(CTRexScenario.scripts_path, profile_bench['name']), **kwargs) self.stl_trex.reset() self.stl_trex.clear_stats() @@ -36,11 +36,14 @@ class STLBenchmark_Test(CStlGeneral_Test): raise Exception('Timeout on waiting for stabilization, CPU util values: %s' % cpu_utils) if stats[0]['opackets'] < 10000 or stats[1]['opackets'] < 10000: raise Exception('Too few opackets, port0: %s, port1: %s' % (stats[0]['opackets'], stats[1]['opackets'])) - print stats['global'] if stats['global']['queue_full'] > 100000: raise Exception('Too much queue_full: %s' % stats['global']['queue_full']) + if not cpu_utils[-1]: + 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 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 |