Creates a new Chrome Trace event. For details of the file format, see: https://github.com/catapult-project/catapult/blob/master/tracing/README.md Args: ph: The type of event - usually a single character. category: The event category as a string. name: The event name
(self, ph, category, name, pid, tid, timestamp)
| 62 | self._metadata = [] |
| 63 | |
| 64 | def _create_event(self, ph, category, name, pid, tid, timestamp): |
| 65 | """Creates a new Chrome Trace event. |
| 66 | |
| 67 | For details of the file format, see: |
| 68 | https://github.com/catapult-project/catapult/blob/master/tracing/README.md |
| 69 | |
| 70 | Args: |
| 71 | ph: The type of event - usually a single character. |
| 72 | category: The event category as a string. |
| 73 | name: The event name as a string. |
| 74 | pid: Identifier of the process generating this event as an integer. |
| 75 | tid: Identifier of the thread generating this event as an integer. |
| 76 | timestamp: The timestamp of this event as a long integer. |
| 77 | |
| 78 | Returns: |
| 79 | A JSON compatible event object. |
| 80 | """ |
| 81 | event = {} |
| 82 | event['ph'] = ph |
| 83 | event['cat'] = category |
| 84 | event['name'] = name |
| 85 | event['pid'] = pid |
| 86 | event['tid'] = tid |
| 87 | event['ts'] = timestamp |
| 88 | return event |
| 89 | |
| 90 | def emit_pid(self, name, pid): |
| 91 | """Adds a process metadata event to the trace. |
no outgoing calls
no test coverage detected