Adds a region event to the trace. Args: timestamp: The start timestamp of this region as a long integer. duration: The duration of this region as a long integer. pid: Identifier of the process generating this event as an integer. tid: Identifier of the thread generat
(self, timestamp, duration, pid, tid, category, name, args)
| 118 | self._metadata.append(event) |
| 119 | |
| 120 | def emit_region(self, timestamp, duration, pid, tid, category, name, args): |
| 121 | """Adds a region event to the trace. |
| 122 | |
| 123 | Args: |
| 124 | timestamp: The start timestamp of this region as a long integer. |
| 125 | duration: The duration of this region as a long integer. |
| 126 | pid: Identifier of the process generating this event as an integer. |
| 127 | tid: Identifier of the thread generating this event as an integer. |
| 128 | category: The event category as a string. |
| 129 | name: The event name as a string. |
| 130 | args: A JSON-compatible dictionary of event arguments. |
| 131 | """ |
| 132 | event = self._create_event('X', category, name, pid, tid, timestamp) |
| 133 | event['dur'] = duration |
| 134 | event['args'] = args |
| 135 | self._events.append(event) |
| 136 | |
| 137 | def emit_obj_create(self, category, name, timestamp, pid, tid, object_id): |
| 138 | """Adds an object creation event to the trace. |
no test coverage detected