MCPcopy Create free account
hub / github.com/prometheus/client_python / test_counter

Method test_counter

tests/test_core.py:758–760  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

756 self.assertEqual(1, self.registry.get_sample_value('u_unit', {}))
757
758 def test_counter(self):
759 self.custom_collector(CounterMetricFamily('c_total', 'help', value=1))
760 self.assertEqual(1, self.registry.get_sample_value('c_total', {}))
761
762 def test_counter_utf8(self):
763 self.custom_collector(CounterMetricFamily('my.metric', 'help', value=1))

Callers

nothing calls this directly

Calls 3

custom_collectorMethod · 0.95
CounterMetricFamilyClass · 0.90
get_sample_valueMethod · 0.80

Tested by

no test coverage detected