1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Curated bounded mailbox pressure and rejection counters from the driver.
use crate::driver::owner::observation::DriverMailboxMetrics;
/// Current bounded driver mailbox pressure and cumulative rejection totals.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct EngineMailboxMetrics(DriverMailboxMetrics);
impl EngineMailboxMetrics {
pub(super) const fn from_driver(inner: DriverMailboxMetrics) -> Self {
Self(inner)
}
/// Returns each independent work and control command bound.
pub const fn capacity_per_lane(self) -> usize {
self.0.capacity_per_lane()
}
/// Returns each independent work and control retained-byte bound.
pub const fn byte_capacity_per_lane(self) -> usize {
self.0.byte_capacity_per_lane()
}
/// Returns ordinary commands awaiting interpretation.
pub const fn queued_work(self) -> usize {
self.0.queued_work()
}
/// Returns bytes retained by ordinary queued commands.
pub const fn queued_work_bytes(self) -> usize {
self.0.queued_work_bytes()
}
/// Returns priority control commands awaiting interpretation.
pub const fn queued_control(self) -> usize {
self.0.queued_control()
}
/// Returns bytes retained by priority control commands.
pub const fn queued_control_bytes(self) -> usize {
self.0.queued_control_bytes()
}
/// Returns cumulative ordinary count-capacity rejections.
pub const fn work_full(self) -> u64 {
self.0.work_full()
}
/// Returns cumulative ordinary byte-capacity rejections.
pub const fn work_byte_full(self) -> u64 {
self.0.work_byte_full()
}
/// Returns cumulative control count-capacity rejections.
pub const fn control_full(self) -> u64 {
self.0.control_full()
}
/// Returns cumulative control byte-capacity rejections.
pub const fn control_byte_full(self) -> u64 {
self.0.control_byte_full()
}
/// Returns commands rejected after driver admission closed.
pub const fn closed_rejections(self) -> u64 {
self.0.closed_rejections()
}
/// Returns admitted commands returned because the poller wake failed.
pub const fn wake_failures(self) -> u64 {
self.0.wake_failures()
}
}