pub struct AuditMetrics { /* private fields */ }Expand description
Metrics collector for audit system observability
Implementations§
Source§impl AuditMetrics
impl AuditMetrics
Sourcepub fn record_event_success(&self, dispatch_time: Duration)
pub fn record_event_success(&self, dispatch_time: Duration)
Records a successful event dispatch
Sourcepub fn record_event_failure(&self, dispatch_time: Duration)
pub fn record_event_failure(&self, dispatch_time: Duration)
Records a failed event dispatch
Sourcepub fn record_target_success(&self)
pub fn record_target_success(&self)
Records a successful target operation
Sourcepub fn record_target_failure(&self)
pub fn record_target_failure(&self)
Records a failed target operation
Sourcepub fn record_config_reload(&self)
pub fn record_config_reload(&self)
Records a configuration reload
Sourcepub fn record_system_start(&self)
pub fn record_system_start(&self)
Records a system start
Sourcepub async fn get_events_per_second(&self) -> f64
pub async fn get_events_per_second(&self) -> f64
Gets the current events per second (EPS)
Sourcepub fn get_average_latency_ms(&self) -> f64
pub fn get_average_latency_ms(&self) -> f64
Gets the average dispatch latency in milliseconds
Sourcepub fn get_error_rate(&self) -> f64
pub fn get_error_rate(&self) -> f64
Gets the error rate as a percentage
Sourcepub fn get_target_success_rate(&self) -> f64
pub fn get_target_success_rate(&self) -> f64
Gets target success rate as a percentage
Sourcepub async fn generate_report(&self) -> AuditMetricsReport
pub async fn generate_report(&self) -> AuditMetricsReport
Generates a comprehensive metrics report
Sourcepub async fn validate_performance_requirements(&self) -> PerformanceValidation
pub async fn validate_performance_requirements(&self) -> PerformanceValidation
Validates performance requirements
Trait Implementations§
Source§impl Debug for AuditMetrics
impl Debug for AuditMetrics
Auto Trait Implementations§
impl !Freeze for AuditMetrics
impl !RefUnwindSafe for AuditMetrics
impl !UnwindSafe for AuditMetrics
impl Send for AuditMetrics
impl Sync for AuditMetrics
impl Unpin for AuditMetrics
impl UnsafeUnpin for AuditMetrics
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request