diff --git a/benchmark3.py b/benchmark3.py index 648c1a1..c04a903 100644 --- a/benchmark3.py +++ b/benchmark3.py @@ -148,10 +148,11 @@ def write_results(results, file_handle): # Latency and rtt are in ms 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: + 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 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, csv_time_format(result.upload_started), csv_time_format(result.upload_finished), + http_time, result.upload_status_code, csv_time_format(result.alert_arrived), latency, @@ -173,6 +175,7 @@ def main(): id - Unique ID of a request (not sequential but at least unique) http_start_time - Timestamp of when the HTTP request is started 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 mqtt_arrive_time - Timestamp of when the corresponding MQTT message arrived latency - Latency of the system (http_complete_time - mqtt_arrive_time) in milliseconds