Documentation
¶
Overview ¶
Package process measures the current (atmos) process's own resource usage — wall-clock time, CPU time, and (on platforms that support it) peak memory, page faults, context switches, and block I/O. It measures the atmos process itself, not any terraform/tofu subprocess it may shell out to.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessMetrics ¶
type ProcessMetrics struct {
WallTime time.Duration
UserCPUTime time.Duration
SystemCPUTime time.Duration
MaxRSSBytes int64
MinorPageFaults int64
MajorPageFaults int64
InBlockOps int64
OutBlockOps int64
VolCtxSwitches int64
InvolCtxSwitches int64
}
ProcessMetrics captures how much time and system resources the atmos process itself consumed. Fields not available on the current platform (e.g. Windows) are left zero-valued; callers that marshal this struct should use omitempty for those fields.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is a point-in-time capture of process resource usage, taken as early as possible in the process lifetime, used later to compute a diff via Since().
func Baseline ¶
func Baseline() Snapshot
Baseline captures a Snapshot as early as possible in the process's lifetime. Both the async and synchronous exec-metadata capture paths diff against the same baseline.
func (Snapshot) Since ¶
func (s Snapshot) Since() ProcessMetrics
Since computes the ProcessMetrics accumulated since the Snapshot was taken.