Added http time to output
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f09e8abbf2
commit
0b5a47b531
@ -148,10 +148,11 @@ def write_results(results, file_handle):
|
|||||||
# Latency and rtt are in ms
|
# Latency and rtt are in ms
|
||||||
|
|
||||||
writer.writerow(
|
writer.writerow(
|
||||||
['id', 'http_start_time', 'http_complete_time', 'status_code', 'mqtt_arrive_time', 'latency', 'rtt']
|
['id', 'http_start_time', 'http_complete_time', 'http_time', 'status_code', 'mqtt_arrive_time', 'latency', 'rtt']
|
||||||
)
|
)
|
||||||
|
|
||||||
for result in results:
|
for result in results:
|
||||||
|
http_time = (result.upload_finished - result.upload_started) * 1000 if result.upload_finished else None
|
||||||
latency = (result.alert_arrived - result.upload_finished) * 1000 if result.alert_arrived else None
|
latency = (result.alert_arrived - result.upload_finished) * 1000 if result.alert_arrived else None
|
||||||
rtt = (result.alert_arrived - result.upload_started) * 1000 if result.alert_arrived else None
|
rtt = (result.alert_arrived - result.upload_started) * 1000 if result.alert_arrived else None
|
||||||
|
|
||||||
@ -159,6 +160,7 @@ def write_results(results, file_handle):
|
|||||||
result.id,
|
result.id,
|
||||||
csv_time_format(result.upload_started),
|
csv_time_format(result.upload_started),
|
||||||
csv_time_format(result.upload_finished),
|
csv_time_format(result.upload_finished),
|
||||||
|
http_time,
|
||||||
result.upload_status_code,
|
result.upload_status_code,
|
||||||
csv_time_format(result.alert_arrived),
|
csv_time_format(result.alert_arrived),
|
||||||
latency,
|
latency,
|
||||||
@ -173,6 +175,7 @@ def main():
|
|||||||
id - Unique ID of a request (not sequential but at least unique)
|
id - Unique ID of a request (not sequential but at least unique)
|
||||||
http_start_time - Timestamp of when the HTTP request is started
|
http_start_time - Timestamp of when the HTTP request is started
|
||||||
http_complete_time - Timestamp of when the HTTP request is completed
|
http_complete_time - Timestamp of when the HTTP request is completed
|
||||||
|
http_time - Time it took to perform the HTTP request (i.e. Uploading) in milliseconds
|
||||||
status_code - Status code of the HTTP request
|
status_code - Status code of the HTTP request
|
||||||
mqtt_arrive_time - Timestamp of when the corresponding MQTT message arrived
|
mqtt_arrive_time - Timestamp of when the corresponding MQTT message arrived
|
||||||
latency - Latency of the system (http_complete_time - mqtt_arrive_time) in milliseconds
|
latency - Latency of the system (http_complete_time - mqtt_arrive_time) in milliseconds
|
||||||
|
Loading…
Reference in New Issue
Block a user