Struct metrics_sqlite::SqliteExporter [−][src]
Exports metrics by storing them in a SQLite database at a periodic interval
Implementations
impl SqliteExporter
[src]
pub fn new<P: AsRef<Path>>(
flush_interval: Duration,
keep_duration: Option<Duration>,
path: P
) -> Result<Self>
[src]
flush_interval: Duration,
keep_duration: Option<Duration>,
path: P
) -> Result<Self>
Creates a new SqliteExporter
that stores metrics in a SQLite database file.
flush_interval
specifies how often metrics are flushed to SQLite/disk
keep_duration
specifies how long data is kept before deleting, performed new()
pub fn install(self) -> Result<(), SetRecorderError>
[src]
Install recorder as metrics
crate’s Recorder
Trait Implementations
impl Drop for SqliteExporter
[src]
impl Recorder for SqliteExporter
[src]
fn register_counter(
&self,
_key: Key,
_unit: Option<Unit>,
_description: Option<&'static str>
)
[src]
&self,
_key: Key,
_unit: Option<Unit>,
_description: Option<&'static str>
)
fn register_gauge(
&self,
_key: Key,
_unit: Option<Unit>,
_description: Option<&'static str>
)
[src]
&self,
_key: Key,
_unit: Option<Unit>,
_description: Option<&'static str>
)
fn register_histogram(
&self,
_key: Key,
_unit: Option<Unit>,
_description: Option<&'static str>
)
[src]
&self,
_key: Key,
_unit: Option<Unit>,
_description: Option<&'static str>
)
fn increment_counter(&self, key: Key, value: u64)
[src]
fn update_gauge(&self, key: Key, value: GaugeValue)
[src]
fn record_histogram(&self, key: Key, value: f64)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SqliteExporter
impl Send for SqliteExporter
impl Sync for SqliteExporter
impl Unpin for SqliteExporter
impl !UnwindSafe for SqliteExporter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
[src]
pub fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
pub fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,