Skip to content

Commit 9a71d52

Browse files
authored
Output max CPU utilization on summarize-benchmark script JSON output format
2 parents 136b3c2 + f319087 commit 9a71d52

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: scripts/performance/benchmark

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ def run_benchmark(pid, output_file, data_interval):
7979
memory_used = process_to_measure.memory_info().rss
8080
cpu_percent = process_to_measure.cpu_percent()
8181
current_net = psutil.net_io_counters(pernic=True)[INTERFACE]
82-
except psutil.AccessDenied:
83-
# Trying to get process information from a closed process will
84-
# result in AccessDenied.
82+
except (psutil.AccessDenied, psutil.ZombieProcess):
83+
# Trying to get process information from a closed or zombie process will
84+
# result in corresponding exceptions.
8585
break
8686

8787
# Collect data on the in/out network io.

Diff for: scripts/performance/summarize

+2
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ class Summarizer:
211211
'std_dev_max_memory': self.std_dev_max_memory,
212212
'average_memory': self.average_memory,
213213
'std_dev_average_memory': self.std_dev_average_memory,
214+
'std_dev_max_cpu': self.std_dev_max_cpu,
215+
'max_cpu': self.max_cpu,
214216
'average_cpu': self.average_cpu,
215217
'std_dev_average_cpu': self.std_dev_average_cpu,
216218
},

0 commit comments

Comments
 (0)