metrics/null.v

41 lines
954 B
V

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_get(metric Metric) ?u64 {
return none
}
pub fn (c &NullCollector) counters() []Metric {
return []
}
pub fn (c &NullCollector) histogram_register(metric Metric) {}
pub fn (c &NullCollector) histogram_record(value f64, metric Metric) {}
pub fn (c &NullCollector) histogram_get(metric Metric) ?[]f64 {
return none
}
pub fn (c &NullCollector) gauge_register(value f64, metric Metric) {}
pub fn (c &NullCollector) gauge_add(value f64, metric Metric) {}
pub fn (c &NullCollector) gauge_sub(value f64, metric Metric) {}
pub fn (c &NullCollector) gauge_set(value f64, metric Metric) {}
pub fn (c &NullCollector) gauge_get(metric Metric) ?f64 {
return none
}