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

Method __call__

prometheus_client/context_managers.py:75–82  ·  view source on GitHub ↗
(self, f: "F")

Source from the content-addressed store, hash-verified

73 self._metric = self._metric.labels(*args, **kw)
74
75 def __call__(self, f: "F") -> "F":
76 def wrapped(func, *args, **kwargs):
77 # Obtaining new instance of timer every time
78 # ensures thread safety and reentrancy.
79 with self._new_timer():
80 return func(*args, **kwargs)
81
82 return decorate(f, wrapped)

Callers

nothing calls this directly

Calls 1

decorateFunction · 0.85

Tested by

no test coverage detected