use cadence::prelude::*;
use cadence::{NopMetricSink, QueuingMetricSink, StatsdClient};
use utils::InstrumentedAllocator;
mod utils;
#[global_allocator]
static GLOBAL: InstrumentedAllocator = InstrumentedAllocator::new();
#[test]
fn test_allocs_statsdclient_nop_queuing_with_tags() {
let client = StatsdClient::from_sink("alloc.test", QueuingMetricSink::from(NopMetricSink));
client.incr("foo").unwrap();
GLOBAL.enable();
client.incr_with_tags("bar").with_tag("x", "y").send();
GLOBAL.disable();
let num_allocs = GLOBAL.num_allocs();
assert_eq!(3, num_allocs)
}