X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=core%2Ftraffic_controller_rfc2544.py;h=aae3ef81b22d348d8adfe47f7b3a0a43e1338b2e;hb=017df35d6c2a73dbdce22e260a8ca16e6b369a01;hp=003307bf436e7f8f58c9f054fa3319eb61a3f8fe;hpb=8d6777df09c3dc441013a31f21cc50ab3b0f42a3;p=vswitchperf.git diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py index 003307bf..aae3ef81 100644 --- a/core/traffic_controller_rfc2544.py +++ b/core/traffic_controller_rfc2544.py @@ -82,10 +82,18 @@ class TrafficControllerRFC2544(ITrafficController, IResults): for packet_size in self._packet_sizes: traffic['l2'] = {'framesize': packet_size} - result = self._traffic_gen_class.send_rfc2544_throughput( - traffic, - trials=int(self._trials), - duration=int(get_test_param('rfc2544_duration', 20))) + if traffic['traffic_type'] == 'back2back': + result = self._traffic_gen_class.send_rfc2544_back2back( + traffic, trials=int(self._trials), + duration=int(get_test_param('rfc2544_duration', 20))) + elif traffic['traffic_type'] == 'continuous': + result = self._traffic_gen_class.send_cont_traffic( + traffic, time=int(get_test_param('rfc2544_duration', 30))) + else: + result = self._traffic_gen_class.send_rfc2544_throughput( + traffic, trials=int(self._trials), + duration=int(get_test_param('rfc2544_duration', 20))) + result = TrafficControllerRFC2544._append_results(result, packet_size) self._results.append(result)