pub struct TenantProjectionMetrics {
pub events_processed: u64,
pub successful_events: u64,
pub failed_events: u64,
pub total_processing_time_ms: f64,
pub average_processing_time_ms: f64,
pub max_processing_time_ms: f64,
pub rebuilds_performed: u64,
pub successful_rebuilds: u64,
pub last_processed: Option<DateTime<Utc>>,
pub last_rebuild: Option<DateTime<Utc>>,
}Expand description
Performance and usage metrics for tenant projections
Fields§
§events_processed: u64§successful_events: u64§failed_events: u64§total_processing_time_ms: f64§average_processing_time_ms: f64§max_processing_time_ms: f64§rebuilds_performed: u64§successful_rebuilds: u64§last_processed: Option<DateTime<Utc>>§last_rebuild: Option<DateTime<Utc>>Implementations§
Source§impl TenantProjectionMetrics
impl TenantProjectionMetrics
pub fn new() -> Self
pub fn record_event_processing(&mut self, duration: Duration, success: bool)
pub fn record_rebuild(&mut self, _duration: Duration, success: bool)
pub fn reset_counters(&mut self)
pub fn success_rate(&self) -> f64
pub fn rebuild_success_rate(&self) -> f64
pub fn is_performance_target_met(&self) -> bool
pub fn aggregate_with(&mut self, other: &TenantProjectionMetrics)
Trait Implementations§
Source§impl Clone for TenantProjectionMetrics
impl Clone for TenantProjectionMetrics
Source§fn clone(&self) -> TenantProjectionMetrics
fn clone(&self) -> TenantProjectionMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TenantProjectionMetrics
impl Debug for TenantProjectionMetrics
Auto Trait Implementations§
impl Freeze for TenantProjectionMetrics
impl RefUnwindSafe for TenantProjectionMetrics
impl Send for TenantProjectionMetrics
impl Sync for TenantProjectionMetrics
impl Unpin for TenantProjectionMetrics
impl UnwindSafe for TenantProjectionMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more