ae4c2a36ce749150a5b29551b6a980f74e50b346
[WebKit-https.git] / Source / WebCore / inspector / protocol / Timeline.json
1 {
2     "domain": "Timeline",
3     "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.",
4     "types": [
5         {
6             "id": "DOMCounters",
7             "type": "object",
8             "properties": [
9                 { "name": "documents", "type": "integer" },
10                 { "name": "nodes", "type": "integer" }
11             ],
12             "description": "Current values of DOM counters."
13         },
14         {
15             "id": "EventType",
16             "type": "string",
17             "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"],
18             "description": "Timeline record type."
19         },
20         {
21             "id": "TimelineEvent",
22             "type": "object",
23             "properties": [
24                 { "name": "type", "$ref": "EventType", "description": "Event type." },
25                 { "name": "thread", "type": "string", "optional": true, "description": "If present, identifies the thread that produced the event." },
26                 { "name": "data", "type": "object", "description": "Event data." },
27                 { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." },
28                 { "name": "counters", "$ref": "DOMCounters", "optional": true, "description": "Current values of DOM counters." },
29                 { "name": "usedHeapSize", "type": "integer", "optional": true, "description": "Current size of JS heap." }
30             ],
31             "description": "Timeline record contains information about the recorded activity."
32         }
33     ],
34     "commands": [
35         {
36             "name": "start",
37             "parameters": [
38                 { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." },
39                 { "name": "includeDomCounters", "optional": true, "type": "boolean", "description": "Whether DOM counters data should be included into timeline events." }
40             ],
41             "description": "Starts capturing instrumentation events."
42         },
43         {
44             "name": "stop",
45             "description": "Stops capturing instrumentation events."
46         },
47         {
48             "name": "supportsFrameInstrumentation",
49             "returns": [
50                 { "name": "result", "type": "boolean", "description": "True if timeline supports frame instrumentation." }
51             ],
52             "description": "Tells whether timeline agent supports frame instrumentation."
53         },
54         {
55             "name": "canMonitorMainThread",
56             "returns": [
57                 { "name": "result", "type": "boolean", "description": "True if timeline supports main thread CPU utilization instrumentation." }
58             ],
59             "description": "Tells whether timeline agent supports main thread CPU utilization instrumentation."
60         }
61     ],
62     "events": [
63         {
64             "name": "eventRecorded",
65             "parameters": [
66                 { "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." }
67             ],
68             "description": "Fired for every instrumentation event while timeline is started."
69         }
70     ]
71 }