Macro prometheus::register_histogram[][src]

macro_rules! register_histogram {
    ($NAME:expr, $HELP:expr) => { ... };
    ($NAME:expr, $HELP:expr, $BUCKETS:expr) => { ... };
    ($HOPTS:expr) => { ... };
}

Create a [Histogram] and registers to default registry.

Examples

let opts = histogram_opts!("test_macro_histogram", "help");
let res1 = register_histogram!(opts);
assert!(res1.is_ok());

let res2 = register_histogram!("test_macro_histogram_2", "help");
assert!(res2.is_ok());

let res3 = register_histogram!("test_macro_histogram_4",
                                "help",
                                vec![1.0, 2.0]);
assert!(res3.is_ok());