#[repr(transparent)]pub struct GaugeCount(pub u64);Expand description
Gauge-family unitless count (u64). Distinct from
MonotonicCount: a MonotonicCount only ever goes UP
over a thread’s lifetime (integrated from birth), while a
GaugeCount is sampled at capture time and can go up AND
down at runtime as the underlying state changes. Distinct
from GaugeNs: same Maxable-only contract, but renders as
a unitless count rather than a nanosecond ladder.
nr_threads (the process-wide thread count from
signal_struct->nr_threads) is the canonical example —
threads spawn and exit, so the value is not monotonic.
Summing thread counts across a group is meaningless (a bucket
of N threads sharing a tgid would over-count their parent
process N-fold); the registry reduces by Max so the rendered
cell shows “the largest process represented in this bucket.”
Routing this kind of field through GaugeNs would render
it on the ns auto-scale ladder — a unit lie. The dedicated
type makes the intent explicit at the field declaration and
lets the format dispatch pick the unitless ladder
instead.
Tuple Fields§
§0: u64Trait Implementations§
Source§impl Clone for GaugeCount
impl Clone for GaugeCount
Source§fn clone(&self) -> GaugeCount
fn clone(&self) -> GaugeCount
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GaugeCount
impl Debug for GaugeCount
Source§impl Default for GaugeCount
impl Default for GaugeCount
Source§fn default() -> GaugeCount
fn default() -> GaugeCount
Source§impl<'de> Deserialize<'de> for GaugeCount
impl<'de> Deserialize<'de> for GaugeCount
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for GaugeCount
impl Display for GaugeCount
Source§impl From<GaugeCount> for u64
impl From<GaugeCount> for u64
Source§fn from(v: GaugeCount) -> Self
fn from(v: GaugeCount) -> Self
Source§impl From<u64> for GaugeCount
impl From<u64> for GaugeCount
Source§impl Hash for GaugeCount
impl Hash for GaugeCount
Source§impl Maxable for GaugeCount
impl Maxable for GaugeCount
fn max_across(items: impl IntoIterator<Item = Self>) -> Option<Self>
Source§impl Ord for GaugeCount
impl Ord for GaugeCount
Source§fn cmp(&self, other: &GaugeCount) -> Ordering
fn cmp(&self, other: &GaugeCount) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for GaugeCount
impl PartialEq for GaugeCount
Source§impl PartialOrd for GaugeCount
impl PartialOrd for GaugeCount
Source§impl Serialize for GaugeCount
impl Serialize for GaugeCount
impl Copy for GaugeCount
impl Eq for GaugeCount
impl StructuralPartialEq for GaugeCount
Auto Trait Implementations§
impl Freeze for GaugeCount
impl RefUnwindSafe for GaugeCount
impl Send for GaugeCount
impl Sync for GaugeCount
impl Unpin for GaugeCount
impl UnwindSafe for GaugeCount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more