pub struct MetricsSnapshot {
pub encode_cycles: u64,
pub decode_cycles: u64,
pub encoded_bytes: u32,
pub decoded_bytes: u32,
pub sample_count: u32,
}Expand description
Per-direction framing metrics accumulated since the last snapshot reset.
Returned by CmdID super::CMD_ID_METRICS (0xFFFE). The target
atomically resets all counters when it replies.
Cycle counts are DWT cycle counter deltas (Cortex-M4F @ firmware clock frequency). Convert to wall-clock duration by dividing by the CPU frequency in Hz.
Fields§
§encode_cycles: u64Total DWT cycles spent in rzcobs_encode (upstream, target→host).
decode_cycles: u64Total DWT cycles spent in rzcobs_decode (downstream, host→target).
encoded_bytes: u32Total payload bytes input to rzcobs_encode (pre-framing size).
decoded_bytes: u32Total payload bytes output by rzcobs_decode (post-unframe size).
sample_count: u32Number of complete request/response round trips counted.
Trait Implementations§
Source§impl Clone for MetricsSnapshot
impl Clone for MetricsSnapshot
Source§fn clone(&self) -> MetricsSnapshot
fn clone(&self) -> MetricsSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricsSnapshot
impl Debug for MetricsSnapshot
Source§impl Default for MetricsSnapshot
impl Default for MetricsSnapshot
Source§fn default() -> MetricsSnapshot
fn default() -> MetricsSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetricsSnapshot
impl<'de> Deserialize<'de> for MetricsSnapshot
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Schema for MetricsSnapshot
impl Schema for MetricsSnapshot
Source§impl Serialize for MetricsSnapshot
impl Serialize for MetricsSnapshot
impl Copy for MetricsSnapshot
Auto Trait Implementations§
impl Freeze for MetricsSnapshot
impl RefUnwindSafe for MetricsSnapshot
impl Send for MetricsSnapshot
impl Sync for MetricsSnapshot
impl Unpin for MetricsSnapshot
impl UnsafeUnpin for MetricsSnapshot
impl UnwindSafe for MetricsSnapshot
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
Mutably borrows from an owned value. Read more