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

Method __check_for_pid_change

prometheus_client/values.py:87–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 self._value, self._timestamp = self._file.read_value(self._key)
86
87 def __check_for_pid_change(self):
88 actual_pid = process_identifier()
89 if pid['value'] != actual_pid:
90 pid['value'] = actual_pid
91 # There has been a fork(), reset all the values.
92 for f in files.values():
93 f.close()
94 files.clear()
95 for value in values:
96 value.__reset()
97
98 def inc(self, amount):
99 with lock:

Callers 4

__init__Method · 0.95
incMethod · 0.95
setMethod · 0.95
getMethod · 0.95

Calls 4

valuesMethod · 0.80
closeMethod · 0.80
__resetMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected