Type alias TraceEventJSONObject

TraceEventJSONObject: {
    displayTimeUnit?: "ms" | "ns";
    otherData?: Record<string, unknown>;
    powerTraceAsString?: string;
    samples?: GlobalSample[];
    stackFrames?: Record<StackFrameId, StackFrame>;
    systemTraceEvents?: string;
    traceEvents: Event[];
}

Type declaration

  • Optional displayTimeUnit?: "ms" | "ns"

    String that specifies in which unit timestamps should be displayed.

    Default

    'ms'
    
  • Optional otherData?: Record<string, unknown>

    Any other properties seen in the object, in this case otherData are assumed to be metadata for the trace. They will be collected and stored in an array in the trace model. This metadata is accessible through the Metadata button in Trace Viewer.

  • Optional powerTraceAsString?: string

    String of BattOr power data.

  • Optional samples?: GlobalSample[]

    Stores sampling profiler data from a OS level profiler. The stored samples are different from trace event samples, and is meant to augment the traceEvent data with lower level information. It is OK to have a trace event file with just sample data, but in that case TraceEventJSONObject#traceEvents must still be provided and set to [].

  • Optional stackFrames?: Record<StackFrameId, StackFrame>

    Dictionary of stack frames, their ids, and their parents that allows compact representation of stack traces throughout the rest of the trace file. It is optional but sometimes very useful in shrinking file sizes.

  • Optional systemTraceEvents?: string

    String of Linux ftrace data or Windows ETW trace data. This data must start with # tracer: and adhere to the Linux ftrace format or adhere to Windows ETW format.

    See

    http://lwn.net/Articles/365835/

  • traceEvents: Event[]

    Essentially, an array of event objects. The events do not have to be in timestamp-sorted order.