MCPcopy Create free account
hub / github.com/dfinity/orbit / remove_counter

Method remove_counter

libs/orbit-essentials/src/metrics.rs:110–116  ·  view source on GitHub ↗

Removes a counter metric with the given name.

(&mut self, name: &str)

Source from the content-addressed store, hash-verified

108
109 /// Removes a counter metric with the given name.
110 pub fn remove_counter(&mut self, name: &str) {
111 if let Some(counter) = self.metric_counters.remove(name) {
112 self.registry
113 .unregister(Box::new(counter))
114 .expect("Failed to unregister counter");
115 }
116 }
117
118 /// Returns a gauge vec metric with the given name, helper message, and set of label names.
119 ///

Callers 1

test_remove_counterFunction · 0.80

Calls 1

removeMethod · 0.45

Tested by 1

test_remove_counterFunction · 0.64