mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
addition of test output logic for urls_per_ten , arg parsing changes to var_time
This commit is contained in:
@@ -199,14 +199,17 @@ python3 ./test_ipv4_variable_time.py
|
||||
if (args.num_stations is not None) and (int(args.num_stations) > 0):
|
||||
num_sta = int(args.num_stations)
|
||||
|
||||
#Create directory
|
||||
homedir=str(datetime.datetime.now()).replace(':','-')+'test_ipv4_variable_time'
|
||||
os.mkdir('/home/lanforge/report_data/'+homedir)
|
||||
if args.report_file is None:
|
||||
if args.output_format in ['csv','json','html','hdf','stata','pickle','pdf','parquet']:
|
||||
report_f='/home/lanforge/report-data/'+str(datetime.datetime.now()).replace(':','-')+'test_ipv4_variable_time.' + args.output_format
|
||||
if args.output_format in ['csv','json','html','hdf','stata','pickle','pdf','parquet','xlsx']:
|
||||
report_f='/home/lanforge/report-data/'+homedir+'/data.' + args.output_format
|
||||
output=args.output_format
|
||||
else:
|
||||
print('Defaulting to Excel')
|
||||
report_f='/home/lanforge/report-data/'+str(datetime.datetime.now()).replace(':','-')+'test_ipv4_variable_time.xlsx'
|
||||
output='excel'
|
||||
print('Defaulting data file output type to Excel')
|
||||
report_f='/home/lanforge/report-data/'+homedir+'/data.xlsx'
|
||||
output='xlsx'
|
||||
else:
|
||||
report_f=args.report_file
|
||||
if args.output_format is None:
|
||||
@@ -240,16 +243,19 @@ python3 ./test_ipv4_variable_time.py
|
||||
ip_var_test.exit_fail()
|
||||
ip_var_test.start(False, False)
|
||||
|
||||
|
||||
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'],
|
||||
try:
|
||||
layer3connections=','.join([[*x.keys()][0] for x in ip_var_test.local_realm.json_get('endp')['endpoint']])
|
||||
except:
|
||||
raise ValueError('Try setting the upstream port flag if your device does not have an eth1 port')
|
||||
ip_var_test.l3cxprofile.monitor(col_names=['Name','Tx Rate','Rx Rate','Tx PDUs','Rx PDUs','Rx Drop % A', 'Rx Drop % B', 'Bps Rx A', 'Bps Rx B', 'Rx Rate', 'Cx Estab'],
|
||||
report_file=report_f,
|
||||
duration_sec=ip_var_test.local_realm.parse_time(args.test_duration).seconds,
|
||||
duration_sec=ip_var_test.local_realm.parse_time(args.test_duration).total_seconds(),
|
||||
created_cx= layer3connections,
|
||||
output_format=output,
|
||||
script_name='test_ipv4_variable_time',
|
||||
show=show,
|
||||
arguments=args)
|
||||
|
||||
|
||||
ip_var_test.stop()
|
||||
if not ip_var_test.passes():
|
||||
print(ip_var_test.get_fail_message())
|
||||
|
||||
Reference in New Issue
Block a user