MCPcopy Index your code
hub / github.com/prometheus/client_python / _child_samples

Method _child_samples

prometheus_client/metrics.py:796–802  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

794 self._value = self._states.index(state)
795
796 def _child_samples(self) -> Iterable[Sample]:
797 with self._lock:
798 return [
799 Sample('', {self._name: s}, 1 if i == self._value else 0, None, None)
800 for i, s
801 in enumerate(self._states)
802 ]

Callers

nothing calls this directly

Calls 1

SampleClass · 0.85

Tested by

no test coverage detected