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

Method reset

prometheus_client/metrics.py:345–348  ·  view source on GitHub ↗

Reset the counter to zero. Use this when a logical process restarts without restarting the actual python process.

(self)

Source from the content-addressed store, hash-verified

343 self._value.set_exemplar(Exemplar(exemplar, amount, time.time()))
344
345 def reset(self) -> None:
346 """Reset the counter to zero. Use this when a logical process restarts without restarting the actual python process."""
347 self._value.set(0)
348 self._created = time.time()
349
350 def count_exceptions(self, exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]] = Exception) -> ExceptionCounter:
351 """Count exceptions in a block of code or function.

Callers 1

test_resetMethod · 0.45

Calls 2

setMethod · 0.45
timeMethod · 0.45

Tested by 1

test_resetMethod · 0.36