From ad6039276061064a0b3bdb62131e8a41b8c4eb09 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Mon, 11 Nov 2024 15:24:37 -0500 Subject: [PATCH 1/2] Fix bug caused by zombie Python child process at measurement time. --- scripts/performance/benchmark | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/performance/benchmark b/scripts/performance/benchmark index d1aa8d7a..ce90320f 100755 --- a/scripts/performance/benchmark +++ b/scripts/performance/benchmark @@ -79,9 +79,9 @@ def run_benchmark(pid, output_file, data_interval): memory_used = process_to_measure.memory_info().rss cpu_percent = process_to_measure.cpu_percent() current_net = psutil.net_io_counters(pernic=True)[INTERFACE] - except psutil.AccessDenied: - # Trying to get process information from a closed process will - # result in AccessDenied. + except (psutil.AccessDenied, psutil.ZombieProcess): + # Trying to get process information from a closed or zombie process will + # result in corresponding exceptions. break # Collect data on the in/out network io. From f319087a73773375c065cfe6d8ee93bab7371395 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Wed, 22 Jan 2025 15:06:55 -0500 Subject: [PATCH 2/2] Output max CPU utilization on performance summarize script. --- scripts/performance/summarize | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/performance/summarize b/scripts/performance/summarize index dd3abc33..388a81c5 100755 --- a/scripts/performance/summarize +++ b/scripts/performance/summarize @@ -211,6 +211,8 @@ class Summarizer: 'std_dev_max_memory': self.std_dev_max_memory, 'average_memory': self.average_memory, 'std_dev_average_memory': self.std_dev_average_memory, + 'std_dev_max_cpu': self.std_dev_max_cpu, + 'max_cpu': self.max_cpu, 'average_cpu': self.average_cpu, 'std_dev_average_cpu': self.std_dev_average_cpu, },