[−][src]Struct coz_temporary::Counter
A coz
-counter which is either intended for throughput or begin
/end
points.
This is typically created by macros above via progress!()
, begin!()
, or
end!()
, but if necessary you can also create one of these manually in your
own application for your own macros.
Methods
impl Counter
[src]
pub const fn progress(name: &'static str) -> Counter
[src]
Creates a throughput coz counter with the given name.
pub const fn begin(name: &'static str) -> Counter
[src]
Creates a latency coz counter with the given name, used for when an operation begins.
Note that this counter should be paired with an end
counter of the
same name.
pub const fn end(name: &'static str) -> Counter
[src]
Creates a latency coz counter with the given name, used for when an operation ends.
Note that this counter should be paired with an begin
counter of the
same name.
pub fn increment(&self)
[src]
Increment that an operation happened on this counter.
For throughput counters this should be called in a location where you want something to happen more often.
For latency-based counters this should be called before and after the operation you'd like to measure the latency of.
Auto Trait Implementations
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
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,
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, 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.
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>,