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_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
|
|
|
|
2022-12-26 14:32:19 +01:00
|
|
|
pub fn (c &NullCollector) histogram_register(metric Metric) {}
|
|
|
|
|
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) ?[]f64 {
|
|
|
|
return none
|
|
|
|
}
|
2022-12-26 18:17:27 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2022-12-26 21:49:07 +01:00
|
|
|
|
|
|
|
pub fn (c &NullCollector) histograms() []Metric {
|
|
|
|
return []
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn (c &NullCollector) gauges() []Metric {
|
|
|
|
return []
|
|
|
|
}
|