Struct function_timer::FunctionTimer
source · 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