pub struct DhtTelemetry { /* private fields */ }Expand description
DHT telemetry collector
Implementations§
Source§impl DhtTelemetry
impl DhtTelemetry
Sourcepub async fn record(&self, point: TelemetryPoint)
pub async fn record(&self, point: TelemetryPoint)
Record a telemetry point
Sourcepub async fn record_put(
&self,
duration: Duration,
hops: usize,
success: bool,
error: Option<String>,
)
pub async fn record_put( &self, duration: Duration, hops: usize, success: bool, error: Option<String>, )
Record a PUT operation
Sourcepub async fn record_get(
&self,
duration: Duration,
hops: usize,
success: bool,
error: Option<String>,
)
pub async fn record_get( &self, duration: Duration, hops: usize, success: bool, error: Option<String>, )
Record a GET operation
Sourcepub async fn record_find_node(
&self,
duration: Duration,
hops: usize,
success: bool,
error: Option<String>,
)
pub async fn record_find_node( &self, duration: Duration, hops: usize, success: bool, error: Option<String>, )
Record a FIND_NODE operation
Sourcepub async fn get_stats(&self) -> TelemetryStats
pub async fn get_stats(&self) -> TelemetryStats
Get current statistics
Sourcepub async fn get_error_summary(&self) -> HashMap<String, usize>
pub async fn get_error_summary(&self) -> HashMap<String, usize>
Get recent error summary
Auto Trait Implementations§
impl Freeze for DhtTelemetry
impl !RefUnwindSafe for DhtTelemetry
impl Send for DhtTelemetry
impl Sync for DhtTelemetry
impl Unpin for DhtTelemetry
impl !UnwindSafe for DhtTelemetry
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