cache/
cache.rs

1//! A sample application asynchronously printing metrics to stdout.
2
3use dipstick::*;
4use std::io;
5use std::thread::sleep;
6use std::time::Duration;
7
8fn main() {
9    let metrics = Stream::write_to(io::stdout())
10        .cached(5)
11        .metrics()
12        .named("cache");
13
14    loop {
15        // report some ad-hoc metric values from our "application" loop
16        metrics.counter("blorf").count(1134);
17        metrics.marker("burg").mark();
18
19        sleep(Duration::from_millis(500));
20    }
21}