diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-04-24 18:51:23 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-04-24 18:51:23 +0300 |
commit | 31e26b04665fa2e41cbfcf92c3ce3ffa95d8a426 (patch) | |
tree | b5dc3f2d2282e693c1f9479897fcc15f1720af3f /scripts/automation/regression/stateful_tests/trex_general_test.py | |
parent | cc53c3d2d4b928221f2d51d3f1ace64f34029f1e (diff) |
regression: bw per core x2
Diffstat (limited to 'scripts/automation/regression/stateful_tests/trex_general_test.py')
-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 7ac49728..94f680b6 100755 --- a/scripts/automation/regression/stateful_tests/trex_general_test.py +++ b/scripts/automation/regression/stateful_tests/trex_general_test.py @@ -151,7 +151,8 @@ class CTRexGeneral_Test(unittest.TestCase): 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 / (ports_count * cores * cpu_util * 1e6) + # x2 because each thread uses 2 ports and another x2 because each core can use 2 threads + test_norm_cpu = 2 * 2 * (100.0 / cpu_util) * trex_tx_bps / (ports_count * cores * 1e6) print("TRex CPU utilization: %g%%, norm_cpu is : %d Mb/core" % (round(cpu_util), int(test_norm_cpu))) |