CommonLibrary/Transport/Metrics.rs
1#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
2//! # Transport Metrics
3//!
4//! Metrics collection for transport operations.
5//! Core metrics types live in [`super::TransportStrategy`].
6
7/// Trait for collecting transport metrics.
8///
9/// Implementations record request outcomes and latency samples,
10/// and produce snapshots for monitoring and diagnostics.
11pub trait MetricsCollector: Send + Sync {
12 /// Records a completed request.
13 ///
14 /// * `Success` - whether the request succeeded
15 /// * `LatencyMilliseconds` - round-trip latency in milliseconds
16 fn RecordRequest(&self, Success:bool, LatencyMilliseconds:f64);
17}