pub struct ModuleStats {
pub calls: u64,
pub successes: u64,
pub errors: u64,
pub total_response_time_ms: u64,
pub last_call: Option<DateTime<Utc>>,
}Expand description
Modul statisztikák
Fields§
§calls: u64Hívások száma
successes: u64Sikeres hívások
errors: u64Hibák száma
total_response_time_ms: u64Összesített válaszidő (ms)
last_call: Option<DateTime<Utc>>Utolsó hívás ideje
Implementations§
Source§impl ModuleStats
impl ModuleStats
Sourcepub fn record_success(&mut self, response_time_ms: u64)
pub fn record_success(&mut self, response_time_ms: u64)
Sikeres hívás regisztrálása
Sourcepub fn record_error(&mut self)
pub fn record_error(&mut self)
Hibás hívás regisztrálása
Sourcepub fn avg_response_time_ms(&self) -> f64
pub fn avg_response_time_ms(&self) -> f64
Átlagos válaszidő
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Sikerességi arány
Trait Implementations§
Source§impl Clone for ModuleStats
impl Clone for ModuleStats
Source§fn clone(&self) -> ModuleStats
fn clone(&self) -> ModuleStats
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 ModuleStats
impl Debug for ModuleStats
Source§impl Default for ModuleStats
impl Default for ModuleStats
Source§fn default() -> ModuleStats
fn default() -> ModuleStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModuleStats
impl<'de> Deserialize<'de> for ModuleStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModuleStats
impl RefUnwindSafe for ModuleStats
impl Send for ModuleStats
impl Sync for ModuleStats
impl Unpin for ModuleStats
impl UnwindSafe for ModuleStats
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> 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