pub struct MetricsDb { /* private fields */ }
Expand description
Metrics database, useful for querying stored metrics
Implementations§
Source§impl MetricsDb
impl MetricsDb
Sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
Creates a new metrics DB with given path of a SQLite database
Sourcepub fn sessions(&self) -> Vec<Session>
pub fn sessions(&self) -> Vec<Session>
Returns sessions in database, based on SESSION_TIME_GAP_THRESHOLD
Sourcepub fn available_keys(&mut self) -> Result<Vec<String>>
pub fn available_keys(&mut self) -> Result<Vec<String>>
Returns list of metrics keys stored in the database
Auto Trait Implementations§
impl Freeze for MetricsDb
impl !RefUnwindSafe for MetricsDb
impl Send for MetricsDb
impl !Sync for MetricsDb
impl Unpin for MetricsDb
impl !UnwindSafe for MetricsDb
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more