pub struct DeviceSummary {
pub id: String,
pub label: Option<String>,
pub attached_secs: u64,
pub last_seen_secs: u64,
pub exchanges: Option<u64>,
pub last_exchange_ms: Option<u64>,
pub mean_exchange_ms: Option<u64>,
pub slowest_exchange_ms: Option<u64>,
}Expand description
A point-in-time view of an attached device.
Separate from Device because a device owns its data connections and
therefore cannot be cloned or serialized; this is what an operator asking
“what is attached right now?” actually needs.
Fields§
§id: StringRouting key used in /d/<id>/….
label: Option<String>Label the device supplied, if any.
attached_secs: u64Seconds since the device attached.
last_seen_secs: u64Seconds since its last heartbeat.
exchanges: Option<u64>Proxied exchanges measured so far, absent until there has been one.
Absent rather than zero: a device nothing has called yet has no timing,
and a 0 there reads as “answers instantly”.
last_exchange_ms: Option<u64>How long the most recent exchange took, in milliseconds.
Transfer and the device’s own processing together — see [Exchanges].
Splitting them is not possible from the relay’s side.
mean_exchange_ms: Option<u64>Mean over every exchange since this device attached, in milliseconds.
slowest_exchange_ms: Option<u64>The slowest single exchange since this device attached, in milliseconds.
Kept alongside the mean because the mean hides exactly the case an operator is looking for: an occasional very slow answer.
Trait Implementations§
Source§impl Clone for DeviceSummary
impl Clone for DeviceSummary
Source§fn clone(&self) -> DeviceSummary
fn clone(&self) -> DeviceSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceSummary
impl Debug for DeviceSummary
Auto Trait Implementations§
impl Freeze for DeviceSummary
impl RefUnwindSafe for DeviceSummary
impl Send for DeviceSummary
impl Sync for DeviceSummary
impl Unpin for DeviceSummary
impl UnsafeUnpin for DeviceSummary
impl UnwindSafe for DeviceSummary
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.