[][src]Function metrical::counter

pub fn counter(name: String) -> Counter

Create a counter to count a metric that always increases.

Example

use metrical::counter;

pub fn do_something() {
// Count the number of times this function is called
let mut cnt = counter("do_something".to_owned());
cnt.increment(1);

//...
}