Struct tirexTrackingConf_st¶
ClassList > tirexTrackingConf_st
Configures a tracking session: which measures to collect, which process (and optionally its descendants) to measure, and how often to poll. More...
#include <tirex_tracker.h>
Public Attributes¶
| Type | Name |
|---|---|
| const tirexMeasureConf * | measures tirexNullConf-terminated array of measures to track. |
| int64_t | pid TIREX_PID_SELF (default) to track the calling process, or an explicit target process ID. |
| size_t | pollIntervalMs The interval, in milliseconds, at which to poll for updated stats. Ignored by tirexFetchInfo, which does not poll. |
| bool | trackSubprocesses If true, also discover and aggregate the descendants of pid over the tracking session, instead of measuringpid alone. |
Detailed Description¶
For a minimal config, usetirexTrackingConf{.measures = ..., .pollIntervalMs = 100} to track the current process without its children.
Public Attributes Documentation¶
variable measures¶
tirexNullConf-terminated array of measures to track.
variable pid¶
TIREX_PID_SELF (default) to track the calling process, or an explicit target process ID.
variable pollIntervalMs¶
The interval, in milliseconds, at which to poll for updated stats. Ignored by tirexFetchInfo, which does not poll.
variable trackSubprocesses¶
If true, also discover and aggregate the descendants of pid over the tracking session, instead of measuringpid alone.
Applies to both TIREX_CPU_USED_PROCESS_PERCENT and TIREX_RAM_USED_PROCESS_KB, summed across pid and every descendant process discovered at each poll. CPU time is simply additive (never shared between processes), so that figure is exact. RAM cannot simply be summed (that would double-count pages shared between processes, e.g. shared libraries or fork()-inherited copy-on-write pages), so each platform instead uses its own best-available deduplicated approximation: PSS on Linux (divides each shared page's cost by its global mapper count; may slightly undercount pages also shared with processes outside the tracked tree), ri_phys_footprint on macOS (Apple's own per-process accounting, but not a fair-share scheme; can overcount memory the tree's own members share with each other), and PrivateUsage on Windows (excludes all shared memory entirely, so it cannot double-count but does undercount by any memory shared within the tree; also tracks committed virtual memory rather than strictly resident physical memory, unlike the single-process figure).
The documentation for this class was generated from the following file c/include/tirex_tracker.h