arg additions

This commit is contained in:
Dipti
2021-01-28 11:31:35 -08:00
parent f5b1fae73e
commit e9e92ae76b
2 changed files with 7 additions and 21 deletions

View File

@@ -1168,24 +1168,6 @@ class L3CXProfile(BaseProfile):
output_format = report_file.split('.')[-1]
#retrieve compared report if specified - turn into dataframe
if compared_report is not None:
compared_format = compared_report.split('.')[-1]
#initial dataframe
previous_data_df = pd.DataFrame()
if compared_format == 'hdf':
#df.to_hdf(report_file, 'table', append=True)
continue
if compared_format == 'parquet':
#df.to_parquet(report_file, engine='pyarrow')
continue
if compared_format == 'png':
#fig = df.plot().get_figure()
#fig.savefig(report_file)
continue
if compared_format.lower() in ['excel', 'xlsx'] or report_file.split('.')[-1] == 'xlsx':
continue
if compared_format == 'df':
#return df
continue
supported_formats = ['csv', 'json', 'stata', 'pickle','html']
for format in supported_formats:
if compared_format.lower() == format:
@@ -1237,6 +1219,7 @@ class L3CXProfile(BaseProfile):
self._fail("FAIL: Not all stations increased traffic")
self.exit_fail()
old_cx_rx_values = new_cx_rx_values
#write csv file here - open, write, and close file
time.sleep(monitor_interval)
print(value_map)
@@ -1266,7 +1249,6 @@ class L3CXProfile(BaseProfile):
df=df[["Timestamp","Timestamp milliseconds", *header_row[:-2]]]
#compare previous data to current data
try:
systeminfo = ast.literal_eval(requests.get('http://'+str(self.lfclient_host)+':'+str(self.lfclient_port)).text)
except:

View File

@@ -193,9 +193,10 @@ python3 ./test_ipv4_variable_time.py
optional_args.add_argument('--a_min', help='--a_min bps rate minimum for side_a', default=256000)
optional_args.add_argument('--b_min', help='--b_min bps rate minimum for side_b', default=256000)
optional_args.add_argument('--test_duration', help='--test_duration sets the duration of the test', default="2m")
optional_args.add_argument('--col_names', help='Columns wished to be monitor', default=['name','tx bytes', 'rx bytes','dropped'])
optional_args.add_argument('--col_names', help='Columns wished to be monitor',default=['name','tx bytes', 'rx bytes','dropped'])
optional_args.add_argument('--compared_report',help='report path and file which is wished to be compared with new report', default=None)
args = parser.parse_args()
#['name','tx bytes', 'rx bytes','dropped']
num_sta = 2
if (args.num_stations is not None) and (int(args.num_stations) > 0):
@@ -223,7 +224,9 @@ python3 ./test_ipv4_variable_time.py
output=str(args.report_file).split('.')[-1]
else:
output=args.output_format
#Retrieve last data file
compared_rept=None
if args.compared_report:
#check if last report format is same as current rpt format
last_report_format = args.compared_report.split('.')[-1]
@@ -267,7 +270,8 @@ python3 ./test_ipv4_variable_time.py
col_names=None
else:
col_names = args.col_names
print(col_names)
if args.debug:
print(col_names)
ip_var_test.l3cxprofile.monitor(col_names=col_names,
report_file=report_f,
duration_sec=ip_var_test.local_realm.parse_time(args.test_duration).total_seconds(),