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

Method _multi_samples

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

Source from the content-addressed store, hash-verified

268 return self._child_samples()
269
270 def _multi_samples(self) -> Iterable[Sample]:
271 with self._lock:
272 metrics = self._metrics.copy()
273 for labels, metric in metrics.items():
274 series_labels = list(zip(self._labelnames, labels))
275 for suffix, sample_labels, value, timestamp, exemplar, native_histogram_value in metric._samples():
276 yield Sample(suffix, dict(series_labels + list(sample_labels.items())), value, timestamp, exemplar, native_histogram_value)
277
278 def _child_samples(self) -> Iterable[Sample]: # pragma: no cover
279 raise NotImplementedError('_child_samples() must be implemented by %r' % self)

Callers 1

_samplesMethod · 0.95

Calls 2

SampleClass · 0.85
_samplesMethod · 0.80

Tested by

no test coverage detected