From 1063208d4de5da410c50547b0f593a51a532a53b Mon Sep 17 00:00:00 2001 From: marcsello Date: Fri, 23 Oct 2020 16:17:24 +0200 Subject: [PATCH] Added help for columns --- benchmark3.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/benchmark3.py b/benchmark3.py index b57e6f8..395527f 100644 --- a/benchmark3.py +++ b/benchmark3.py @@ -13,6 +13,7 @@ import queue import sys import csv import random +import textwrap @dataclass(frozen=False, init=True) @@ -164,10 +165,22 @@ def write_results(results, file_handle): def main(): - parser = argparse.ArgumentParser( - description='Birbnetes Benchmarker 3' - ) + help_epilog = textwrap.dedent('''\ + CSV Columns meaning: + 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 + 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 + rtt - Total round trip time (http_start_time - mqtt_arrive_time) in milliseconds + ''') + parser = argparse.ArgumentParser( + description='Birbnetes Benchmarker 3', + epilog=help_epilog, + formatter_class=argparse.RawTextHelpFormatter + ) parser.add_argument('--workers', type=int, required=False, default=1, help='Number of workers (or threads)') parser.add_argument('--timeout', type=int, required=False, default=10, help='Maximum time for request sending (0 for unlimited)')