properly use parse_time to render test duration

This commit is contained in:
Matthew Stidham
2020-12-22 10:13:39 -08:00
parent 03f2c10578
commit 0b4e31fa52
2 changed files with 2 additions and 2 deletions

View File

@@ -1082,7 +1082,7 @@ class L3CXProfile(LFCliBase):
report_file=None,
output_format=None):
try:
duration_sec=local_realm.parse_time(duration_sec)
duration_sec=local_realm.parse_time(duration_sec).seconds
except:
if (duration_sec is None) or (duration_sec <= 1):
raise ValueError("L3CXProfile::monitor wants duration_sec > 1 second")

View File

@@ -233,7 +233,7 @@ def main():
layer3connections=','.join([[*x.keys()][0] for x in ip_var_test.l3cxprofile.json_get('endp')['endpoint']])
ip_var_test.l3cxprofile.monitor(col_names=['Name','Tx Rate','Rx Rate','Tx PDUs','Rx PDUs'],
report_file=report_f,
duration_sec=args.test_duration,
duration_sec=ip_var_test.local_realm.parse_time(args.test_duration).seconds,
created_cx= layer3connections,
ouput_format='excel')
ip_var_test.stop()