UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

86 lines (75 loc) 3.04 kB
/* Event type | Event phases ===================================================== Duration Events | B (begin), E (end) ----------------------------------------------------- Complete Events | X ----------------------------------------------------- Instant Events | i | Deprecated: I ----------------------------------------------------- Counter Events | C ----------------------------------------------------- Async Events | b (nestable start), n (nestable instant), e (nestable end) | Deprecated: S (start), T (step into), p (step past), F (end) ----------------------------------------------------- Flow Events | s (start), t (step), f (end) ----------------------------------------------------- Sample Events | P ----------------------------------------------------- Object Events | N (created), O (snapshot), D (destroyed) ----------------------------------------------------- Metadata Events | M ----------------------------------------------------- Memory Dump Events | V (global), v (process) ----------------------------------------------------- Mark Events | R ----------------------------------------------------- Clock Sync Events | c ----------------------------------------------------- Context Events | (, ) */ export class TraceEvent { /** * The name of the event, as displayed in Trace Viewer * @type {string} */ name = ""; /** * 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. * @type {string|undefined} */ cat = undefined; /** * The event type. This is a single character which changes depending on the type of event being output. * The valid values are listed in the table above. We will discuss each phase type below. * * @type {string} */ ph = ""; /** * The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity. * @type {number} */ ts = 0; /** * Optional. The thread clock timestamp of the event. The timestamps are provided at microsecond granularity. * @type {string|undefined} */ tts = undefined; /** * The process ID for the process that output this event. * @type {number} */ pid = 0; /** * The thread ID for the thread that output this event. * @type {number} */ tid = 0; /** * 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. * @type {Object} */ args = {}; }