metrics/null.v

27 lines
609 B
Coq
Raw Normal View History

2022-12-26 14:32:19 +01:00
module metrics
[heap]
struct NullCollector {}
pub fn new_null_collector() &NullCollector {
return &NullCollector{}
}
pub fn (c &NullCollector) counter_register(value u64, metric Metric) {}
pub fn (c &NullCollector) counter_increment(metric Metric) {}
pub fn (c &NullCollector) counter_decrement(metric Metric) {}
pub fn (c &NullCollector) counter_get(metric Metric) ?u64 {
return none
}
pub fn (c &NullCollector) histogram_register(metric Metric) {}
pub fn (c &NullCollector) histogram_add(value f64, metric Metric) {}
pub fn (c &NullCollector) histogram_get(metric Metric) ?[]f64 {
return none
}