pub struct DiskSnapshot {
pub device: Box<str>,
pub model: Option<Box<str>>,
pub read: MetricState<Rate>,
pub write: MetricState<Rate>,
pub read_ops: MetricState<Rate>,
pub write_ops: MetricState<Rate>,
pub busy: MetricState<Percent>,
pub queue_length: MetricState<f32>,
pub totals: MetricState<DiskTotals>,
pub mount_points: Vec<Box<str>>,
}Expand description
Throughput of one block device.
Contains no capacity fields at all; that is FilesystemSnapshot’s job.
Fields§
§device: Box<str>Kernel device name, e.g. nvme0n1 or disk0.
model: Option<Box<str>>Hardware model, where reported.
read: MetricState<Rate>Read throughput.
write: MetricState<Rate>Write throughput.
read_ops: MetricState<Rate>Read operations per second.
write_ops: MetricState<Rate>Write operations per second.
busy: MetricState<Percent>Fraction of wall time the device had at least one request in flight.
§7.3 limits this to platforms where it is semantically correct: it is
derived from /proc/diskstats field 10 on Linux and is
MetricState::Unsupported elsewhere, because a queue-depth-based
approximation on an NVMe device is misleading rather than merely
imprecise.
queue_length: MetricState<f32>Average in-flight request count.
totals: MetricState<DiskTotals>Cumulative counters.
mount_points: Vec<Box<str>>Mount points backed by this device, where the mapping is available.
§8.6 puts this expensive mapping in the on-demand tier, so it is often empty in a fast-tier snapshot.
Implementations§
Source§impl DiskSnapshot
impl DiskSnapshot
Sourcepub fn warming_up(device: Box<str>) -> Self
pub fn warming_up(device: Box<str>) -> Self
A device whose counters exist but whose rates need a second sample.
Trait Implementations§
Source§impl Clone for DiskSnapshot
impl Clone for DiskSnapshot
Source§fn clone(&self) -> DiskSnapshot
fn clone(&self) -> DiskSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more