You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tests/cpu-monitor): handle errors in case process or thread dies
The logic I've added to monitor the CPU wasn't handling the error when
the process or thread died.
This change adds the required error handling. In case a process
terminates, the get_cpu_times will return an empty dict and the
get_cpu_utilization will also return an empty dict. In case a thread
dies, the cpu usage of that thread will be omitted from get_cpu_times
and get_cpu_utilization (due to the set intersection). In all cases,
track_cpu_utilization will only add to the list of values the threads
that are returned, if any.
Signed-off-by: Riccardo Mancini <[email protected]>
0 commit comments