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

Method emit_counters

serving/tools/timeline/timeline.py:271–283  ·  view source on GitHub ↗

Emits a counter record for the dictionary 'counters'. 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.

(self, category, name, pid, timestamp, counters)

Source from the content-addressed store, hash-verified

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'.
273
274 Args:
275 category: The event category as a string.
276 name: The event name as a string.
277 pid: Identifier of the process generating this event as an integer.
278 timestamp: The timestamp of this event as a long integer.
279 counters: Dictionary of counter values.
280 """
281 event = self._create_event('C', category, name, pid, 0, timestamp)
282 event['args'] = counters.copy()
283 self._events.append(event)
284
285 def format_to_string(self, pretty=False):
286 """Formats the chrome trace to a string.

Callers

nothing calls this directly

Calls 3

_create_eventMethod · 0.95
copyMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected