{ "domain": "Timeline", "description": "Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.", "types": [ { "id": "DOMCounters", "type": "object", "properties": [ { "name": "documents", "type": "integer" }, { "name": "nodes", "type": "integer" }, { "name": "jsEventListeners", "type": "integer" } ], "description": "Current values of DOM counters." }, { "id": "EventType", "type": "string", "enum": ["EventDispatch", "BeginFrame", "ScheduleStyleRecalculation", "RecalculateStyles", "InvalidateLayout", "Layout", "Paint", "ScrollLayer", "ResizeImage", "CompositeLayers", "ParseHTML", "TimerInstall", "TimerRemove", "TimerFire", "EvaluateScript", "MarkLoad", "MarkDOMContent", "TimeStamp", "Time", "TimeEnd", "ScheduleResourceRequest", "ResourceSendRequest", "ResourceReceiveResponse", "ResourceReceivedData", "ResourceFinish", "XHRReadyStateChange", "XHRLoad", "FunctionCall", "GCEvent", "RequestAnimationFrame", "CancelAnimationFrame", "FireAnimationFrame", "WebSocketCreate", "WebSocketSendHandshakeRequest", "WebSocketReceiveHandshakeResponse", "WebSocketDestroy"], "description": "Timeline record type." }, { "id": "TimelineEvent", "type": "object", "properties": [ { "name": "type", "$ref": "EventType", "description": "Event type." }, { "name": "thread", "type": "string", "optional": true, "description": "If present, identifies the thread that produced the event." }, { "name": "data", "type": "object", "description": "Event data." }, { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }, { "name": "counters", "$ref": "DOMCounters", "optional": true, "description": "Current values of DOM counters." }, { "name": "usedHeapSize", "type": "integer", "optional": true, "description": "Current size of JS heap." } ], "description": "Timeline record contains information about the recorded activity." } ], "commands": [ { "name": "start", "parameters": [ { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to maxCallStackDepth, defaults to 5." }, { "name": "includeDomCounters", "optional": true, "type": "boolean", "description": "Whether DOM counters data should be included into timeline events." } ], "description": "Starts capturing instrumentation events." }, { "name": "stop", "description": "Stops capturing instrumentation events." }, { "name": "supportsFrameInstrumentation", "returns": [ { "name": "result", "type": "boolean", "description": "True if timeline supports frame instrumentation." } ], "description": "Tells whether timeline agent supports frame instrumentation." }, { "name": "canMonitorMainThread", "returns": [ { "name": "result", "type": "boolean", "description": "True if timeline supports main thread CPU utilization instrumentation." } ], "description": "Tells whether timeline agent supports main thread CPU utilization instrumentation." } ], "events": [ { "name": "eventRecorded", "parameters": [ { "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." } ], "description": "Fired for every instrumentation event while timeline is started." } ] }