MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / emit_counter

Method emit_counter

serving/tools/timeline/timeline.py:256–269  ·  view source on GitHub ↗

Emits a record for a single counter. Args: category: The event category as a string. name: The event name as a string. pid: Identifier of the process generating this event as an integer. timestamp: The timestamp of this event as a long integer. counter: Name of

(self, category, name, pid, timestamp, counter, value)

Source from the content-addressed store, hash-verified

254
255
256 def emit_counter(self, category, name, pid, timestamp, counter, value):
257 """Emits a record for a single counter.
258
259 Args:
260 category: The event category as a string.
261 name: The event name as a string.
262 pid: Identifier of the process generating this event as an integer.
263 timestamp: The timestamp of this event as a long integer.
264 counter: Name of the counter as a string.
265 value: Value of the counter as an integer.
266 """
267 event = self._create_event('C', category, name, pid, 0, timestamp)
268 event['args'] = {counter: value}
269 self._events.append(event)
270
271 def emit_counters(self, category, name, pid, timestamp, counters):
272 """Emits a counter record for the dictionary 'counters'.

Callers 1

_show_memory_countersMethod · 0.45

Calls 2

_create_eventMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected