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

Method set

prometheus_client/values.py:105–110  ·  view source on GitHub ↗
(self, value, timestamp=None)

Source from the content-addressed store, hash-verified

103 self._file.write_value(self._key, self._value, self._timestamp)
104
105 def set(self, value, timestamp=None):
106 with lock:
107 self.__check_for_pid_change()
108 self._value = value
109 self._timestamp = timestamp or 0.0
110 self._file.write_value(self._key, self._value, self._timestamp)
111
112 def set_exemplar(self, exemplar):
113 # TODO: Implement exemplars for multiprocess mode.

Callers

nothing calls this directly

Calls 2

write_valueMethod · 0.80

Tested by

no test coverage detected