fn bench_static_metrics_handwrite_2(b: &mut Bencher) {
    let counter_vec = IntCounterVec::new(Opts::new("foo", "bar"), &["d1", "d2"]).unwrap();
    struct StaticCounter1 {
        foo: StaticCounter1Field2,
    }
    struct StaticCounter1Field2 {
        bar: IntCounter,
    }
    let static_counter = StaticCounter1 {
        foo: StaticCounter1Field2 {
            bar: counter_vec.with_label_values(&["foo", "bar"]),
        },
    };
    b.iter(|| static_counter.foo.bar.inc());
}
/// Manually implemented static metrics performance, metrics are placed nested inside a struct.
Manually implemented static metrics performance, metrics are placed nested inside a struct.
Manually implemented static metrics performance metrics are placed nested inside a struct .
fn bench_static_metrics_handwrite_2(b: &mut Bencher) {
    let counter_vec = IntCounterVec::new(Opts::new("foo", "bar"), &["d1", "d2"]).unwrap();
    struct StaticCounter1 {
        foo: StaticCounter1Field2,
    }
    struct StaticCounter1Field2 {
        bar: IntCounter,
    }
    let static_counter = StaticCounter1 {
        foo: StaticCounter1Field2 {
            bar: counter_vec.with_label_values(&["foo", "bar"]),
        },
    };
    b.iter(|| static_counter.foo.bar.inc());
}
fn bench_static_metrics_handwrite_2 ( b : & mut Bencher ) { let counter_vec = IntCounterVec :: new ( Opts :: new ( " " , " " ) , & [ " " , " " ] ) . unwrap ( ) ; struct StaticCounter1 { foo : StaticCounter1Field2 , } struct StaticCounter1Field2 { bar : IntCounter , } let static_counter = StaticCounter1 { foo : StaticCounter1Field2 { bar : counter_vec . with_label_values ( & [ " " , " " ] ) , } , } ; b . iter ( | | static_counter . foo . bar . inc ( ) ) ; }
Manually implemented static metrics performance, metrics are placed nested inside a struct.
Manually implemented static metrics performance metrics are placed nested inside a struct .
b
&mut Bencher
b
&mut Bencher