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

Method remove_gauge

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

Removes a gauge metric with the given name.

(&mut self, name: &str)

Source from the content-addressed store, hash-verified

170
171 /// Removes a gauge metric with the given name.
172 pub fn remove_gauge(&mut self, name: &str) {
173 if let Some(gauge) = self.metric_gauges.remove(name) {
174 self.registry
175 .unregister(Box::new(gauge))
176 .expect("Failed to unregister gauge");
177 }
178 }
179
180 /// Exports the metrics in the registry to a buffer in text format.
181 pub fn export_metrics(&self) -> Result<Vec<u8>, prometheus::Error> {

Callers 1

test_remove_gaugeFunction · 0.80

Calls 1

removeMethod · 0.45

Tested by 1

test_remove_gaugeFunction · 0.64