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