mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
milliseconds from datetime object now in own column from datetime object
This commit is contained in:
@@ -1220,15 +1220,17 @@ class L3CXProfile(BaseProfile):
|
||||
for endpoint_data in datum.values():
|
||||
if self.debug:
|
||||
print(endpoint_data)
|
||||
endpoint_data["Timestamp"] = test_timestamp
|
||||
endpoint_data["Timestamp"] = test_timestamp.strftime("%m/%d/%Y %I:%M:%S")
|
||||
endpoint_data["Timestamp milliseconds"] = test_timestamp.strftime("%f")
|
||||
full_test_data_list.append(endpoint_data)
|
||||
if self.debug:
|
||||
print("Printing full data list...")
|
||||
print(full_test_data_list)
|
||||
|
||||
header_row.append('Timestamp')
|
||||
header_row.append('Timestamp milliseconds')
|
||||
df = pd.DataFrame(full_test_data_list)
|
||||
df=df[["Timestamp",*header_row[:-1]]]
|
||||
df=df[["Timestamp","Timestamp milliseconds", *header_row[:-2]]]
|
||||
|
||||
try:
|
||||
systeminfo = ast.literal_eval(requests.get('http://'+str(self.lfclient_host)+':'+str(self.lfclient_port)).text)
|
||||
@@ -1249,7 +1251,7 @@ class L3CXProfile(BaseProfile):
|
||||
fig = df.plot().get_figure()
|
||||
fig.savefig(report_file)
|
||||
if output_format.lower() in ['excel', 'xlsx'] or report_file.split('.')[-1] == 'xlsx':
|
||||
df.to_excel(report_file)
|
||||
df.to_excel(report_file, index=False)
|
||||
if output_format == 'df':
|
||||
return df
|
||||
supported_formats = ['csv', 'json', 'stata', 'pickle','html']
|
||||
|
||||
@@ -192,7 +192,7 @@ 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='Which columns you want to monitor', default=['name','tx bytes','dropped', 'rx bytes'])
|
||||
optional_args.add_argument('--col_names', help='Which columns you want to monitor', default=['name','tx bytes', 'rx bytes','dropped'])
|
||||
args = parser.parse_args()
|
||||
|
||||
num_sta = 2
|
||||
|
||||
Reference in New Issue
Block a user