Logo ProcessKit API Reference

RunProfile Type

Resource summary of one finished run — produced by `RunningProcess.ProfileAsync`. CPU and memory come from the started child process (the same source as `RunningProcess.CpuTime` / `PeakMemoryBytes`), so they are `None` where per-process metrics are unavailable or when the run exited before the first sample landed. Sealed with an internal constructor.

Instance members

Instance member Description

this.AvgCpuCores

Full Usage: this.AvgCpuCores

Returns: float option

Average CPU utilisation over the run, **in cores** (`0.5` = half a core busy on average; can exceed `1.0` for multi-threaded children). `None` when CPU time was never observed or the run had no duration.

Returns: float option

this.CpuTime

Full Usage: this.CpuTime

Returns: TimeSpan option

Cumulative CPU time (user + kernel) at the last successful sample.

Returns: TimeSpan option

this.Duration

Full Usage: this.Duration

Returns: TimeSpan

Wall-clock time from process start until the run finished (exit reaped and output drained).

Returns: TimeSpan

this.ExitCode

Full Usage: this.ExitCode

Returns: int option

The exit code; `None` for a run killed by its timeout or a signal (see `Outcome`).

Returns: int option

this.Outcome

Full Usage: this.Outcome

Returns: Outcome

How the profiled run concluded — a clean exit, a signal kill, or a timeout. `ExitCode` / `Signal` / `TimedOut` are the convenience reads over it, so a profile is a superset of `Wait`: one call yields both the telemetry and the outcome. A signal kill and a timeout both leave `ExitCode` `None` (a clean exit is `Some code`), so `Outcome` / `TimedOut` / `Signal` are how you tell those two apart.

Returns: Outcome

this.PeakMemoryBytes

Full Usage: this.PeakMemoryBytes

Returns: int64 option

Peak resident memory observed across the samples, in bytes.

Returns: int64 option

this.Samples

Full Usage: this.Samples

Returns: int

How many sampling ticks ran (including ones that found no data).

Returns: int

this.Signal

Full Usage: this.Signal

Returns: int option

The terminating signal number when the run was signal-killed (Unix); `None` otherwise.

Returns: int option

this.TimedOut

Full Usage: this.TimedOut

Returns: bool

True when the run was killed by its timeout.

Returns: bool

Type something to start searching.