MCPcopy Create free account
hub / github.com/Boris-code/feapder / get_timer_point

Method get_timer_point

feapder/utils/metrics.py:268–282  ·  view source on GitHub ↗
(
        self,
        measurement: str,
        key: str = None,
        duration: float = 0,
        tags: dict = None,
        timestamp=None,
    )

Source from the content-addressed store, hash-verified

266 return point
267
268 def get_timer_point(
269 self,
270 measurement: str,
271 key: str = None,
272 duration: float = 0,
273 tags: dict = None,
274 timestamp=None,
275 ):
276 tags = tags.copy() if tags else {}
277 if key is not None:
278 tags["_key"] = key
279 tags["_type"] = "timer"
280 fields = dict(_duration=ensure_float(duration))
281 point = self.make_point(measurement, tags, fields, timestamp=timestamp)
282 return point
283
284 def emit_any(self, *args, **kwargs):
285 point = self.make_point(*args, **kwargs)

Callers 1

emit_timerMethod · 0.95

Calls 3

make_pointMethod · 0.95
ensure_floatFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected