pub struct SystemMetrics {
pub batches_processed: AtomicU64,
pub activations_total: AtomicU64,
pub deactivations_total: AtomicU64,
pub agent_failures: AtomicU64,
pub evaluation_errors: AtomicU64,
pub rule_evaluations: Mutex<HashMap<String, AtomicU64>>,
pub rule_activations: Mutex<HashMap<String, AtomicU64>>,
pub evaluation_duration: Histogram,
pub rule_evaluation_duration: Mutex<HashMap<String, Histogram>>,
pub agent_execution_duration: Mutex<HashMap<String, Histogram>>,
}Fields§
§batches_processed: AtomicU64§activations_total: AtomicU64§deactivations_total: AtomicU64§agent_failures: AtomicU64§evaluation_errors: AtomicU64§rule_evaluations: Mutex<HashMap<String, AtomicU64>>§rule_activations: Mutex<HashMap<String, AtomicU64>>§evaluation_duration: Histogram§rule_evaluation_duration: Mutex<HashMap<String, Histogram>>§agent_execution_duration: Mutex<HashMap<String, Histogram>>Implementations§
Source§impl SystemMetrics
impl SystemMetrics
pub fn new() -> Self
pub fn record_evaluation_duration(&self, duration_secs: f64)
pub fn record_agent_execution_duration( &self, agent_name: &str, duration_secs: f64, )
pub fn record_rule_evaluation(&self, rule_id: &str)
pub fn record_rule_activation(&self, rule_id: &str)
pub fn record_deactivation(&self)
pub fn record_evaluation_error(&self)
pub fn record_rule_evaluation_duration(&self, rule_id: &str, duration_secs: f64)
pub fn snapshot(&self) -> MetricsSnapshot
pub fn to_prometheus(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SystemMetrics
impl RefUnwindSafe for SystemMetrics
impl Send for SystemMetrics
impl Sync for SystemMetrics
impl Unpin for SystemMetrics
impl UnwindSafe for SystemMetrics
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> 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