pub struct TenantUsage {
pub events_today: u64,
pub total_events: u64,
pub storage_bytes: u64,
pub queries_this_hour: u64,
pub active_api_keys: u32,
pub active_projections: u32,
pub active_pipelines: u32,
pub last_daily_reset: DateTime<Utc>,
pub last_hourly_reset: DateTime<Utc>,
}Expand description
Tenant usage statistics
Fields§
§events_today: u64Events ingested today
total_events: u64Total events stored
storage_bytes: u64Storage used in bytes
queries_this_hour: u64Queries in current hour
active_api_keys: u32Active API keys
active_projections: u32Active projections
active_pipelines: u32Active pipelines
last_daily_reset: DateTime<Utc>Last reset time for daily counters
last_hourly_reset: DateTime<Utc>Last reset time for hourly counters
Implementations§
Source§impl TenantUsage
impl TenantUsage
Sourcepub fn reset_daily_if_needed(&mut self)
pub fn reset_daily_if_needed(&mut self)
Reset daily counters if needed
Sourcepub fn reset_hourly_if_needed(&mut self)
pub fn reset_hourly_if_needed(&mut self)
Reset hourly counters if needed
Sourcepub fn check_and_reset(&mut self)
pub fn check_and_reset(&mut self)
Check and reset counters
Trait Implementations§
Source§impl Clone for TenantUsage
impl Clone for TenantUsage
Source§fn clone(&self) -> TenantUsage
fn clone(&self) -> TenantUsage
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 TenantUsage
impl Debug for TenantUsage
Source§impl Default for TenantUsage
impl Default for TenantUsage
Source§impl<'de> Deserialize<'de> for TenantUsage
impl<'de> Deserialize<'de> for TenantUsage
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 TenantUsage
impl RefUnwindSafe for TenantUsage
impl Send for TenantUsage
impl Sync for TenantUsage
impl Unpin for TenantUsage
impl UnwindSafe for TenantUsage
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