Increase number of runs to ensure good results

This commit is contained in:
Nick Mowen 2022-11-09 13:51:29 -07:00
parent 134b401226
commit 66cb682dd4

View File

@ -684,7 +684,8 @@ def escape_special_characters(path: str) -> str:
def get_cpu_stats() -> dict[str, dict]: def get_cpu_stats() -> dict[str, dict]:
"""Get cpu usages for each process id""" """Get cpu usages for each process id"""
usages = {} usages = {}
top_command = ["top", "-b", "-n", "1"] # -n=2 runs to ensure extraneous values are not included
top_command = ["top", "-b", "-n", "2"]
p = sp.run( p = sp.run(
top_command, top_command,