diff options
author | Hanoh Haim <hhaim@cisco.com> | 2017-01-22 16:05:19 +0200 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2017-01-22 16:05:19 +0200 |
commit | b81cdb6c2d6d118c1c346e7c8dae6a5e747d867d (patch) | |
tree | 36b2c7eefb3130475d0915706cf7ff3e34d7d13e /scripts/automation/regression/stateful_tests | |
parent | 57e58214a60b6665e22bb114356233a122d1ef84 (diff) |
Stateful - add short flow test with high active flow 8-4Mflows
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'scripts/automation/regression/stateful_tests')
-rwxr-xr-x | scripts/automation/regression/stateful_tests/trex_imix_test.py | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_imix_test.py b/scripts/automation/regression/stateful_tests/trex_imix_test.py index e1a8eb0b..5f52fab7 100755 --- a/scripts/automation/regression/stateful_tests/trex_imix_test.py +++ b/scripts/automation/regression/stateful_tests/trex_imix_test.py @@ -18,6 +18,99 @@ class CTRexIMIX_Test(CTRexGeneral_Test): # self.router.clear_counters() pass + def test_short_flow(self): + """ short UDP flow with 64B packets, this test with small number of active flows """ + # test initializtion + if not self.is_loopback: + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + + ret = self.trex.start_trex( + c = core, + m = mult, + p = True, + nc = True, + d = 30, + f = 'cap2/cur_flow.yaml', + l = 1000) + + trex_res = self.trex.sample_to_run_finish() + + # trex_res is a CTRexResult instance- and contains the summary of the test results + # you may see all the results keys by simply calling here for 'print trex_res.result' + print("\nLATEST RESULT OBJECT:") + print(trex_res) + + self.check_general_scenario_results(trex_res) + self.check_CPU_benchmark(trex_res) + + def test_short_flow_high_active(self): + """ short UDP flow with 64B packets, this test with 8M active flows """ + # test initializtion + if not self.is_loopback: + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + active_flows =self.get_benchmark_param('active_flows') + + + ret = self.trex.start_trex( + c = core, + m = mult, + p = True, + nc = True, + d = 60, + active_flows = active_flows, + f = 'cap2/cur_flow.yaml', + l = 1000) + + trex_res = self.trex.sample_to_run_finish() + + # trex_res is a CTRexResult instance- and contains the summary of the test results + # you may see all the results keys by simply calling here for 'print trex_res.result' + print("\nLATEST RESULT OBJECT:") + print(trex_res) + + self.check_general_scenario_results(trex_res) + self.check_CPU_benchmark(trex_res) + + def test_short_flow_high_active2(self): + """ short UDP flow with 64B packets, this test with 8M active flows """ + # test initializtion + if not self.is_loopback: + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + active_flows =self.get_benchmark_param('active_flows') + + + ret = self.trex.start_trex( + c = core, + m = mult, + p = True, + nc = True, + d = 60, + active_flows = active_flows, + f = 'cap2/cur_flow_single.yaml', + l = 1000) + + trex_res = self.trex.sample_to_run_finish() + + # trex_res is a CTRexResult instance- and contains the summary of the test results + # you may see all the results keys by simply calling here for 'print trex_res.result' + print("\nLATEST RESULT OBJECT:") + print(trex_res) + + self.check_general_scenario_results(trex_res) + self.check_CPU_benchmark(trex_res) + def test_routing_imix_64(self): # test initializtion if not self.is_loopback: |