|
lintel 0.2.0
|
#include <ProcessResourceReader.h>
Public Member Functions | |
| ProcessResourceReader ()=delete | |
Static Public Member Functions | |
| static ProcessResourceData | readOf (ProcessId pid, const std::optional< ProcessResourceData > &previous) |
Reads per-process resource usage. Supports Linux (/proc) and macOS (libproc). On other platforms all values are reported as invalid (no resource data). Pass the previously returned snapshot into the next call to compute a CPU percentage delta.
|
delete |
|
static |
Read the current resource snapshot for the given process.
| pid | the operating system process id |
| previous | a previously read snapshot used to compute the CPU delta |