metrics/counter_test.v

15 lines
293 B
V

module metrics
fn test_counter_increment() {
mut m := new_default_collector()
m.counter_register(0, name: 'test')
m.counter_increment(name: 'test')
assert m.counter_get(name: 'test')? == u64(1)
m.counter_increment(name: 'test')
assert m.counter_get(name: 'test')? == u64(2)
}