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

Method run

prometheus_client/bridge/graphite.py:30–45  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 self._prefix = prefix
29
30 def run(self):
31 wait_until = default_timer()
32 while True:
33 while True:
34 now = default_timer()
35 if now >= wait_until:
36 # May need to skip some pushes.
37 while wait_until < now:
38 wait_until += self._interval
39 break
40 # time.sleep can return early.
41 time.sleep(wait_until - now)
42 try:
43 self._pusher.push(prefix=self._prefix)
44 except OSError:
45 logging.exception("Push failed")
46
47
48class GraphiteBridge:

Callers 5

ctFunction · 0.45
PFunction · 0.45
rsFunction · 0.45
zuFunction · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected