Each complete event logically combines a pair of DurationBeginEvent and DurationEndEvent. In a trace that most of the events are duration events, using complete events to replace the duration events can reduce the size of the trace to about half.

Hierarchy

Properties

args?: Record<string, unknown>

Any arguments provided for the event. Some of the event types have required argument fields, otherwise, you can put any information you wish in here. The arguments are displayed in Trace Viewer when you view an event in the analysis section.

cat: string

The event categories. This is a comma separated list of categories for the event. The categories can be used to hide events in the Trace Viewer UI.

cname?: string

A fixed color name to associate with the event. If provided, cname must be one of the names listed in trace-viewer's base color scheme's [reserved color names list]https://github.com/catapult-project/catapult/blob/main/tracing/tracing/base/color_scheme.html.

dur: number

Specifies the tracing clock duration of complete events in microseconds.

esf?: number

Similar to sf, but it specifies the end stack trace of the event instead. Mutually exclusive with #estack.

estack?: string[]

Similar to stack, but it specifies the end stack trace of the event instead. Mutually exclusive with #esf.

name: string

The name of the event, as displayed in Trace Viewer

ph: "X"

The event type. This is a single character which changes depending on the type of event being output.

pid: number

The process ID for the process that output this event.

sf?: number

An id for a stackFrame object in {@see TraceEventJSONObject#stackFrames}

stack?: string[]

A stack is just an array of strings. Mutually exclusive with sf property. The 0th item in the array is the rootmost part of the callstack, the last item is the leafmost entry in the stack, e.g. the closest to what was running when the event was issued. You can put anything you want in each trace, but strings in hex form ("0x1234") are treated as program counter addresses and are eligible for symbolization.

Example

["0x1", "0x2"]
tdur?: number

Specifies the thread clock duration of complete events in microseconds.

tid: number

The thread ID for the thread that output this event.

ts: number

Time of the start of the complete event. Unlike DurationEvent, the timestamps of complete events can be in any order.

See

tts?: number

Optional. The thread clock timestamp of the event. The timestamps are provided at microsecond granularity.