96422921f0d5179787fc79a492cfcf5c65f9566d
[WebKit-https.git] / Source / JavaScriptCore / 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     "availability": "web",
5     "types": [
6         {
7             "id": "EventType",
8             "type": "string",
9             "enum": [
10                 "EventDispatch",
11                 "ScheduleStyleRecalculation",
12                 "RecalculateStyles",
13                 "InvalidateLayout",
14                 "Layout",
15                 "Paint",
16                 "ScrollLayer",
17                 "ParseHTML",
18                 "TimerInstall",
19                 "TimerRemove",
20                 "TimerFire",
21                 "EvaluateScript",
22                 "MarkLoad",
23                 "MarkDOMContent",
24                 "TimeStamp",
25                 "Time",
26                 "TimeEnd",
27                 "XHRReadyStateChange",
28                 "XHRLoad",
29                 "FunctionCall",
30                 "ProbeSample",
31                 "ConsoleProfile",
32                 "GCEvent",
33                 "RequestAnimationFrame",
34                 "CancelAnimationFrame",
35                 "FireAnimationFrame",
36                 "WebSocketCreate",
37                 "WebSocketSendHandshakeRequest",
38                 "WebSocketReceiveHandshakeResponse",
39                 "WebSocketDestroy"
40             ],
41             "description": "Timeline record type."
42         },
43         {
44             "id": "TimelineEvent",
45             "type": "object",
46             "properties": [
47                 { "name": "type", "$ref": "EventType", "description": "Event type." },
48                 { "name": "data", "type": "object", "description": "Event data." },
49                 { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }
50             ],
51             "description": "Timeline record contains information about the recorded activity."
52         },
53         {
54             "id": "CPUProfileNodeCall",
55             "type": "object",
56             "description": "CPU Profile call info. Holds time information for a specific call that happened on a node.",
57             "properties": [
58                 { "name": "startTime", "type": "number", "description": "Start time for the call." },
59                 { "name": "totalTime", "type": "number", "description": "Total execution time for the call." }
60             ]
61         },
62         {
63             "id": "CPUProfileNode",
64             "type": "object",
65             "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
66             "properties": [
67                 { "name": "id", "type": "integer", "description": "Unique identifier for this call site." },
68                 { "name": "calls", "type": "array", "items": { "$ref": "CPUProfileNodeCall" }, "description": "Calls making up this node." },
69                 { "name": "functionName", "type": "string", "optional": true, "description": "Function name." },
70                 { "name": "url", "type": "string", "optional": true, "description": "URL." },
71                 { "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number." },
72                 { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number." },
73                 { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "optional": true, "description": "Child nodes." }
74             ]
75         },
76         {
77             "id": "CPUProfile",
78             "type": "object",
79             "description": "Profile.",
80             "properties": [
81                 { "name": "rootNodes", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Top level nodes in the stack." },
82                 { "name": "idleTime", "type": "number", "optional": true }
83             ]
84         }
85     ],
86     "commands": [
87         {
88             "name": "start",
89             "parameters": [
90                 { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." }
91             ],
92             "description": "Starts capturing instrumentation events."
93         },
94         {
95             "name": "stop",
96             "description": "Stops capturing instrumentation events."
97         }
98     ],
99     "events": [
100         {
101             "name": "eventRecorded",
102             "parameters": [
103                 { "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." }
104             ],
105             "description": "Fired for every instrumentation event while timeline is started."
106         },
107         {
108             "name": "recordingStarted",
109             "description": "Fired when recording has started."
110         },
111         {
112             "name": "recordingStopped",
113             "description": "Fired when recording has stopped."
114         }
115     ]
116 }