bugfix: Parameter duration does not work 77/10477/4
authorMartin Klozik <martinx.klozik@intel.com>
Thu, 18 Feb 2016 12:00:12 +0000 (12:00 +0000)
committerMaryam Tahhan <maryam.tahhan@intel.com>
Tue, 23 Feb 2016 14:46:59 +0000 (14:46 +0000)
Vswitchperf help describes two different options, which will
set lenght of the test or duration of its iteration. It can be set
either by parameter --duration or by --test-params CLI option
duration. However only the second option is implemented. It is
enough to support only one option and thus --duration parameter
has been removed.

Change-Id: Icfa40ec25f50bd090229b0761fa968567d8d3553
JIRA: VSPERF-196
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
core/traffic_controller_rfc2544.py
vsperf

index 7117fee..020b4ae 100644 (file)
@@ -99,18 +99,14 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
                 traffic['l2'] = {'framesize': packet_size}
 
             if traffic['traffic_type'] == 'back2back':
-                self._duration = int(get_test_param('duration', 1))
-                self._trials = int(get_test_param('rfc2544_trials', 1))
                 result = self._traffic_gen_class.send_rfc2544_back2back(
-                    traffic, trials=self._trials,
-                    duration=self._duration)
+                    traffic, trials=self._trials, duration=self._duration)
             elif traffic['traffic_type'] == 'continuous':
                 result = self._traffic_gen_class.send_cont_traffic(
-                    traffic, duration=int(get_test_param('duration', 30)))
+                    traffic, duration=self._duration)
             else:
                 result = self._traffic_gen_class.send_rfc2544_throughput(
-                    traffic, trials=self._trials,
-                    duration=self._duration)
+                    traffic, trials=self._trials, duration=self._duration)
 
             result = TrafficControllerRFC2544._append_results(result,
                                                               packet_size)
diff --git a/vsperf b/vsperf
index db1d5ee..53f5507 100755 (executable)
--- a/vsperf
+++ b/vsperf
@@ -161,7 +161,6 @@ def parse_arguments():
     group.add_argument('--vswitch', help='vswitch implementation to use')
     group.add_argument('--fwdapp', help='packet forwarding application to use')
     group.add_argument('--vnf', help='vnf to use')
-    group.add_argument('--duration', help='traffic transmit duration')
     group.add_argument('--sysmetrics', help='system metrics logger to use')
     group = parser.add_argument_group('test behavior options')
     group.add_argument('--xunit', action='store_true',
@@ -432,13 +431,6 @@ def main():
                           settings.getValue('vnf_dir'))
             sys.exit(1)
 
-    if args['duration']:
-        if args['duration'].isdigit() and int(args['duration']) > 0:
-            settings.setValue('duration', args['duration'])
-        else:
-            logging.error('The selected Duration is not a number')
-            sys.exit(1)
-
     # update global settings
     guest_loopback = get_test_param('guest_loopback', None)
     if guest_loopback: