aboutsummaryrefslogtreecommitdiffstats
path: root/vsperf
diff options
context:
space:
mode:
authorMaryam Tahhan <maryam.tahhan@intel.com>2015-07-30 13:44:36 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-08-26 08:16:32 +0000
commitf426da4469d88fc520fa7aa96576b7ca8096e4d0 (patch)
tree910033827982f8d5e576ecc6b7aaf5ea48e3d087 /vsperf
parent753bce9a5fd3a4d1ae2e2c7268f689bd81b970bd (diff)
bug_fix: process pkt_size/duration from cli
Refactor rfc25444_duration to duration and update the --test-params help to show the type of parameters that can be set from the cli. Also configure pkt_sizes so that it can be modified from the CLI. Also fixes the tcl script to configure framesize properly (to the value selected and not the default 64b). JIRA: VSPERF-27 Change-Id: I76dcd824977a5f940cf7476090d2d2a3acca8160 Signed-off-by: Billy O'Mahony<billy.o.mahony@intel.com> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Dino Madarang <dino.simeonx.madarang@intel.com>
Diffstat (limited to 'vsperf')
-rwxr-xr-xvsperf16
1 files changed, 14 insertions, 2 deletions
diff --git a/vsperf b/vsperf
index 4510e121..d5086ac4 100755
--- a/vsperf
+++ b/vsperf
@@ -56,7 +56,9 @@ def parse_arguments():
"""
Parse and split the '--test-params' argument.
- This expects either 'x=y' or 'x' (implicit true) values.
+ This expects either 'x=y', 'x=y,z' or 'x' (implicit true)
+ values. For multiple overrides use a ; separated list for
+ e.g. --test-params 'x=z; y=a,b'
"""
def __call__(self, parser, namespace, values, option_string=None):
results = {}
@@ -137,6 +139,7 @@ def parse_arguments():
group.add_argument('--trafficgen', help='traffic generator to use')
group.add_argument('--vswitch', help='vswitch implementation 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',
@@ -148,7 +151,9 @@ def parse_arguments():
group.add_argument('--conf-file', action=_ValidateFileAction,
help='settings file')
group.add_argument('--test-params', action=_SplitTestParamsAction,
- help='csv list of test parameters: key=val;...')
+ help='csv list of test parameters: key=val; e.g.'
+ 'including pkt_sizes=x,y; duration=x; '
+ 'rfc2544_trials=x ...')
args = vars(parser.parse_args())
@@ -325,6 +330,13 @@ 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)
+
# generate results directory name
date = datetime.datetime.fromtimestamp(time.time())
results_dir = "results_" + date.strftime('%Y-%m-%d_%H-%M-%S')