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

Method test_counter_total

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

Source from the content-addressed store, hash-verified

764 self.assertEqual(1, self.registry.get_sample_value('my.metric_total', {}))
765
766 def test_counter_total(self):
767 self.custom_collector(CounterMetricFamily('c_total', 'help', value=1))
768 self.assertEqual(1, self.registry.get_sample_value('c_total', {}))
769
770 def test_counter_labels(self):
771 cmf = CounterMetricFamily('c_total', 'help', labels=['a', 'c_total'])

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