pub struct FunctionTimer { /* private fields */ }Expand description
Timer.
Implementations§
Source§impl FunctionTimer
impl FunctionTimer
Sourcepub fn new(
metric_name: &'static str,
struct_name: Option<&'static str>,
function: &'static str,
) -> Self
pub fn new( metric_name: &'static str, struct_name: Option<&'static str>, function: &'static str, ) -> Self
Create a new FunctionTimer.
§Parameters
metric_name: name of the metric.struct_name: name of the struct.function: name of the function that have the annotation. It is used to generate the tagfunction.
Trait Implementations§
Source§impl Drop for FunctionTimer
impl Drop for FunctionTimer
Source§fn drop(&mut self)
fn drop(&mut self)
Get execution time and call histogram!.
Auto Trait Implementations§
impl Freeze for FunctionTimer
impl RefUnwindSafe for FunctionTimer
impl Send for FunctionTimer
impl Sync for FunctionTimer
impl Unpin for FunctionTimer
impl UnwindSafe for FunctionTimer
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