pub struct MetricsCollector { /* private fields */ }Expand description
Metrics collector that aggregates metrics from multiple kernels.
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
Sourcepub fn new() -> MetricsCollector
pub fn new() -> MetricsCollector
Create a new metrics collector.
Sourcepub fn record_message_processed(&self, kernel_id: &KernelId, latency_us: u64)
pub fn record_message_processed(&self, kernel_id: &KernelId, latency_us: u64)
Record a message processed event.
Sourcepub fn record_message_dropped(&self, kernel_id: &KernelId)
pub fn record_message_dropped(&self, kernel_id: &KernelId)
Record a message dropped event.
Sourcepub fn record_error(&self, kernel_id: &KernelId, error_code: u32)
pub fn record_error(&self, kernel_id: &KernelId, error_code: u32)
Record an error.
Sourcepub fn get_telemetry(&self, kernel_id: &KernelId) -> Option<TelemetryBuffer>
pub fn get_telemetry(&self, kernel_id: &KernelId) -> Option<TelemetryBuffer>
Get telemetry for a kernel.
Sourcepub fn get_histogram(&self, kernel_id: &KernelId) -> Option<LatencyHistogram>
pub fn get_histogram(&self, kernel_id: &KernelId) -> Option<LatencyHistogram>
Get histogram for a kernel.
Sourcepub fn get_aggregate(&self) -> TelemetryBuffer
pub fn get_aggregate(&self) -> TelemetryBuffer
Get aggregate telemetry across all kernels.
Trait Implementations§
Source§impl Default for MetricsCollector
impl Default for MetricsCollector
Source§fn default() -> MetricsCollector
fn default() -> MetricsCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MetricsCollector
impl !RefUnwindSafe for MetricsCollector
impl Send for MetricsCollector
impl Sync for MetricsCollector
impl Unpin for MetricsCollector
impl UnwindSafe for MetricsCollector
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.