metrics/null.v

47 lines
1022 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_increment(metric Metric) {}
pub fn (c &NullCollector) counter_set(value u64, metric Metric) {}
2022-12-26 14:32:19 +01:00
pub fn (c &NullCollector) counter_get(metric Metric) ?u64 {
return none
}
2022-12-26 18:17:27 +01:00
pub fn (c &NullCollector) counters() []Metric {
return []
}
2022-12-26 15:03:57 +01:00
2023-01-28 17:33:48 +01:00
pub fn (c &NullCollector) histogram_buckets_set(name string, buckets []f64) {}
2022-12-26 18:17:27 +01:00
pub fn (c &NullCollector) histogram_record(value f64, metric Metric) {}
2022-12-26 14:32:19 +01:00
pub fn (c &NullCollector) histogram_get(metric Metric) ?Histogram {
2022-12-26 14:32:19 +01:00
return none
}
2022-12-26 18:17:27 +01:00
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
}
2022-12-26 21:49:07 +01:00
pub fn (c &NullCollector) histograms() []Metric {
return []
}
pub fn (c &NullCollector) gauges() []Metric {
return []
}