The counter events can track a value or multiple values as they change over time. Counter events are specified with the C phase type. Each counter can be provided with multiple series of data to display. When multiple series are provided they will be displayed as a stacked area chart in Trace Viewer. Please note that counters are process-local.

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?: undefined

Reportedly, counter events do not have categories.

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.

id?: number

When an id field exists, the combination of the event name and id is used as the counter name.

name: string

The name of the event, as displayed in Trace Viewer

ph: "C"

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.

tid: number

The thread ID for the thread that output this event.

ts: number

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

tts?: number

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