pub enum UnavailableReason {
CounterReset,
DeviceDisappeared,
InterfaceRenamed,
ProcessExited,
ReadFailed,
ParseFailed,
Timeout,
SkippedUnderLoad,
LinkSpeedUnknown,
NeedsSecondSample,
}Expand description
Why a normally-available metric is missing from this particular sample.
The specification sketches TemporarilyUnavailable { reason: String }, but
§4 explicitly permits a typed enum when a per-sample String is too costly.
It is: a String in every field of every sample would allocate thousands of
times per second. The human-readable message is produced at the UI layer by
UnavailableReason::message.
Variants§
CounterReset
A cumulative counter moved backwards, so this sample’s delta is invalid.
§8.2 requires returning this rather than a huge or negative rate.
DeviceDisappeared
The device, mount, or interface vanished between two reads.
InterfaceRenamed
The interface was renamed, invalidating the previous counter baseline.
ProcessExited
The process exited between enumeration and the detail read (§8.2).
Expected during normal sampling and never worth a warning log (§14.1).
ReadFailed
The underlying read failed for a reason other than permissions.
ParseFailed
The data was present but did not match the expected format.
Timeout
Collection exceeded its time budget and was abandoned for this sample.
SkippedUnderLoad
Enrichment was skipped to stay inside a budget under high load (§16.2).
LinkSpeedUnknown
A utilization percentage was requested but the link speed is unknown.
§7.4 forbids rendering a network utilization percentage without a known link capacity.
NeedsSecondSample
The metric requires at least two samples and only one exists so far.
Implementations§
Trait Implementations§
Source§fn clone(&self) -> UnavailableReason
fn clone(&self) -> UnavailableReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more