pub struct IdleObservation {
pub elapsed: Duration,
pub start: ProcessUsage,
pub end: ProcessUsage,
pub rates: UsageRates,
}Expand description
What a process did over a quiet window: the idle figures a runtime budget names.
Fields§
§elapsed: Duration§start: ProcessUsage§end: ProcessUsage§rates: UsageRatesImplementations§
Source§impl IdleObservation
impl IdleObservation
Sourcepub fn result_lines(
&self,
warm: &ProcessUsage,
labels: &BudgetLabels<'_>,
) -> String
pub fn result_lines( &self, warm: &ProcessUsage, labels: &BudgetLabels<'_>, ) -> String
The stable machine-readable lines the runtime-budget gate records, one figure per line:
RESULT <key>=<number> <unit>, or RESULT <key>=unavailable <reason> when the host cannot
report the figure (never a stand-in zero). resident_memory_bytes is the resident set at the
end of the idle window. scale and what state the load the crate carried; scope is
synthetic, real or installed.
resident_memory_bytes is the larger of the resident set warm (taken right after the load)
and at the end of the idle window: an OS may compress or page out idle memory, and a ceiling
must cover the loaded state, not only the reclaimed one. The two are also printed separately.
It also prints the single gate line RESULT budget crate=.. version=.. resident_bytes=.. idle_cpu_percent=.. wakeups_per_s=.. disk_ops_per_s=.. scale_unit=.. scale_count=..
(docs/RUNTIME-BUDGETS.md); a figure the host cannot report prints unavailable there, which
the gate refuses, and is never replaced by zero.