pub struct TelemetryCollector { /* private fields */ }Expand description
Telemetry collector for system metrics
Implementations§
Source§impl TelemetryCollector
impl TelemetryCollector
Sourcepub async fn record_lookup(&self, latency: Duration, hops: u8)
pub async fn record_lookup(&self, latency: Duration, hops: u8)
Record a lookup operation
Sourcepub fn record_timeout(&self)
pub fn record_timeout(&self)
Record a timeout
Sourcepub fn record_dht_put(&self)
pub fn record_dht_put(&self)
Record a DHT put operation
Sourcepub fn record_dht_get(&self)
pub fn record_dht_get(&self)
Record a DHT get operation
Sourcepub fn record_auth_failure(&self)
pub fn record_auth_failure(&self)
Record an auth failure
Sourcepub async fn record_stream_bandwidth(
&self,
class: StreamClass,
bytes_per_sec: u64,
)
pub async fn record_stream_bandwidth( &self, class: StreamClass, bytes_per_sec: u64, )
Record stream bandwidth
Sourcepub async fn record_stream_rtt(&self, class: StreamClass, rtt: Duration)
pub async fn record_stream_rtt(&self, class: StreamClass, rtt: Duration)
Record stream RTT
Sourcepub async fn get_metrics(&self) -> Metrics
pub async fn get_metrics(&self) -> Metrics
Get current metrics
Sourcepub fn get_counters(&self) -> EventCounters
pub fn get_counters(&self) -> EventCounters
Get event counters
Sourcepub async fn get_stream_metrics(
&self,
class: StreamClass,
) -> Option<StreamMetrics>
pub async fn get_stream_metrics( &self, class: StreamClass, ) -> Option<StreamMetrics>
Get stream metrics for a class
Sourcepub async fn record_stream_class_usage(&self, class: StreamClass)
pub async fn record_stream_class_usage(&self, class: StreamClass)
Record stream class usage
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TelemetryCollector
impl !RefUnwindSafe for TelemetryCollector
impl Send for TelemetryCollector
impl Sync for TelemetryCollector
impl Unpin for TelemetryCollector
impl !UnwindSafe for TelemetryCollector
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