diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-04-24 15:54:07 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-04-24 15:54:07 +0300 |
commit | cc53c3d2d4b928221f2d51d3f1ace64f34029f1e (patch) | |
tree | d5f3c2bd3840a096090e32ae80d149fc66088a45 /scripts/automation/regression/stateful_tests | |
parent | 19f6e9305ae851214c63e2dd45be9965faef6413 (diff) |
stateful API: add get_ports_count based on result
regression: be per core takes into account number of ports
Diffstat (limited to 'scripts/automation/regression/stateful_tests')
-rwxr-xr-x | scripts/automation/regression/stateful_tests/trex_general_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py index 12c822f2..7ac49728 100755 --- a/scripts/automation/regression/stateful_tests/trex_general_test.py +++ b/scripts/automation/regression/stateful_tests/trex_general_test.py @@ -149,8 +149,9 @@ class CTRexGeneral_Test(unittest.TestCase): self.fail("CPU is too low (%s%%), can't verify performance in such low CPU%%." % cpu_util ) cores = self.get_benchmark_param('cores') + ports_count = trex_res.get_ports_count() trex_tx_bps = sum(trex_res.get_value_list("trex-global.data.m_tx_bps")[-4:-1]) / 3.0 - test_norm_cpu = 200.0 * trex_tx_bps / (cores * cpu_util * 1e6) + test_norm_cpu = 200.0 * trex_tx_bps / (ports_count * cores * cpu_util * 1e6) print("TRex CPU utilization: %g%%, norm_cpu is : %d Mb/core" % (round(cpu_util), int(test_norm_cpu))) |