(self)
| 690 | return Timer(self, 'observe') |
| 691 | |
| 692 | def _child_samples(self) -> Iterable[Sample]: |
| 693 | samples = [] |
| 694 | acc = 0.0 |
| 695 | for i, bound in enumerate(self._upper_bounds): |
| 696 | acc += self._buckets[i].get() |
| 697 | samples.append(Sample('_bucket', {'le': floatToGoString(bound)}, acc, None, self._buckets[i].get_exemplar())) |
| 698 | samples.append(Sample('_count', {}, acc, None, None)) |
| 699 | if self._upper_bounds[0] >= 0: |
| 700 | samples.append(Sample('_sum', {}, self._sum.get(), None, None)) |
| 701 | if _use_created: |
| 702 | samples.append(Sample('_created', {}, self._created, None, None)) |
| 703 | return tuple(samples) |
| 704 | |
| 705 | |
| 706 | class Info(MetricWrapperBase): |
nothing calls this directly
no test coverage detected