From da10b04006b39cfbc2fb7500e765851c6ead69ea Mon Sep 17 00:00:00 2001 From: jist <95856749+george0st@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:39:18 +0200 Subject: [PATCH 1/2] Shorter human output --- qgate_perf/file_format.py | 13 +++++++------ qgate_perf/parallel_probe.py | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/qgate_perf/file_format.py b/qgate_perf/file_format.py index 41283fe..5aa3d79 100644 --- a/qgate_perf/file_format.py +++ b/qgate_perf/file_format.py @@ -32,7 +32,9 @@ class FileFormat: PRF_DETAIL_TIME_START = "startexec" PRF_DETAIL_TIME_END = "endexec" # detail for HUMAN - HR_PRF_DETAIL_STDEV = "stdev" + HR_PRF_DETAIL_CALLS = "calls" + HR_PRF_DETAIL_AVRG = "avr" + HR_PRF_DETAIL_STDEV = "std" # core output PRF_CORE_TYPE = "core" @@ -46,11 +48,10 @@ class FileFormat: PRF_CORE_TOTAL_CALL_PER_SEC = "total_call_per_sec" PRF_CORE_TIME_END = "endexec" # core output for HUMAN - HM_PRF_CORE_PLAN_EXECUTOR_ALL = "plan_exec" - HM_PRF_CORE_PLAN_EXECUTOR = "plan_detail" + HM_PRF_CORE_PLAN_EXECUTOR_ALL = "planexec" HM_PRF_CORE_REAL_EXECUTOR = "exec" HM_PRF_CORE_GROUP = "grp" HM_PRF_CORE_TOTAL_CALL = "calls" - HM_PRF_CORE_AVRG_TIME = "avrg" - HM_PRF_CORE_STD_DEVIATION = "st-dev" - HM_PRF_CORE_TOTAL_CALL_PER_SEC = "call_sec" + HM_PRF_CORE_TOTAL_CALL_PER_SEC = "callsec" + HM_PRF_CORE_AVRG_TIME = "avr" + HM_PRF_CORE_STD_DEVIATION = "std" diff --git a/qgate_perf/parallel_probe.py b/qgate_perf/parallel_probe.py index bd2f2f5..5e6a158 100644 --- a/qgate_perf/parallel_probe.py +++ b/qgate_perf/parallel_probe.py @@ -10,7 +10,7 @@ class ParallelProbe: """ Provider probe for parallel test tuning """ - HUMAN_PRECISION = 5 + HUMAN_PRECISION = 4 def __init__(self, run_setup: RunSetup, exception=None): """ @@ -120,8 +120,8 @@ def readable_str(self): if self.exception is None: return json.dumps({ - FileFormat.PRF_DETAIL_CALLS: self.counter, - FileFormat.PRF_DETAIL_AVRG: nan if self.counter == 0 else round(self.total_duration / self.counter, ParallelProbe.HUMAN_PRECISION), + FileFormat.HR_PRF_DETAIL_CALLS: self.counter, + FileFormat.HR_PRF_DETAIL_AVRG: nan if self.counter == 0 else round(self.total_duration / self.counter, ParallelProbe.HUMAN_PRECISION), FileFormat.PRF_DETAIL_MIN: round(self.min_duration, ParallelProbe.HUMAN_PRECISION), FileFormat.PRF_DETAIL_MAX: round(self.max_duration, ParallelProbe.HUMAN_PRECISION), FileFormat.HR_PRF_DETAIL_STDEV: round(self.standard_deviation, ParallelProbe.HUMAN_PRECISION) From 99d0c158322562c2104fe9e71bb5f5afd2d33a97 Mon Sep 17 00:00:00 2001 From: jist <95856749+george0st@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:53:08 +0200 Subject: [PATCH 2/2] ... --- qgate_perf/file_format.py | 6 +++--- qgate_perf/parallel_executor.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qgate_perf/file_format.py b/qgate_perf/file_format.py index 5aa3d79..0f2d472 100644 --- a/qgate_perf/file_format.py +++ b/qgate_perf/file_format.py @@ -32,7 +32,7 @@ class FileFormat: PRF_DETAIL_TIME_START = "startexec" PRF_DETAIL_TIME_END = "endexec" # detail for HUMAN - HR_PRF_DETAIL_CALLS = "calls" + HR_PRF_DETAIL_CALLS = "call" HR_PRF_DETAIL_AVRG = "avr" HR_PRF_DETAIL_STDEV = "std" @@ -48,10 +48,10 @@ class FileFormat: PRF_CORE_TOTAL_CALL_PER_SEC = "total_call_per_sec" PRF_CORE_TIME_END = "endexec" # core output for HUMAN - HM_PRF_CORE_PLAN_EXECUTOR_ALL = "planexec" + HM_PRF_CORE_PLAN_EXECUTOR_ALL = "plan" HM_PRF_CORE_REAL_EXECUTOR = "exec" HM_PRF_CORE_GROUP = "grp" - HM_PRF_CORE_TOTAL_CALL = "calls" + HM_PRF_CORE_TOTAL_CALL = "call" HM_PRF_CORE_TOTAL_CALL_PER_SEC = "callsec" HM_PRF_CORE_AVRG_TIME = "avr" HM_PRF_CORE_STD_DEVIATION = "std" diff --git a/qgate_perf/parallel_executor.py b/qgate_perf/parallel_executor.py index bc633c3..33cea61 100644 --- a/qgate_perf/parallel_executor.py +++ b/qgate_perf/parallel_executor.py @@ -264,7 +264,7 @@ def _print_detail(self, file, run_setup: RunSetup, return_dict, processes, threa FileFormat.PRF_CORE_TIME_END: datetime.datetime.utcnow().isoformat(' ') } readable_out = { - FileFormat.HM_PRF_CORE_PLAN_EXECUTOR_ALL: f"{processes * threads} [{processes}, {threads}]", + FileFormat.HM_PRF_CORE_PLAN_EXECUTOR_ALL: f"{processes * threads} [{processes},{threads}]", FileFormat.HM_PRF_CORE_REAL_EXECUTOR: count, FileFormat.HM_PRF_CORE_GROUP: group, FileFormat.HM_PRF_CORE_TOTAL_CALL: sum_call,