Web Inspector: Timelines: can't reliably stop/start a recording
[WebKit-https.git] / Source / JavaScriptCore / inspector / protocol / CPUProfiler.json
1 {
2     "domain": "CPUProfiler",
3     "description": "CPUProfiler domain exposes cpu usage tracking.",
4     "featureGuard": "ENABLE(RESOURCE_USAGE)",
5     "availability": ["web"],
6     "types": [
7         {
8             "id": "ThreadInfo",
9             "description": "CPU usage for an individual thread.",
10             "type": "object",
11             "properties": [
12                 { "name": "name", "type": "string", "description": "Some thread identification information." },
13                 { "name": "usage", "type": "number", "description": "CPU usage for this thread. This should not exceed 100% for an individual thread." },
14                 { "name": "type", "type": "string", "enum": ["main", "webkit"], "optional": true, "description": "Type of thread. There should be a single main thread." },
15                 { "name": "targetId", "type": "string", "optional": true, "description": "A thread may be associated with a target, such as a Worker, in the process." }
16             ]
17         },
18         {
19             "id": "Event",
20             "type": "object",
21             "properties": [
22                 { "name": "timestamp", "type": "number" },
23                 { "name": "usage", "type": "number", "description": "Percent of total cpu usage. If there are multiple cores the usage may be greater than 100%." },
24                 { "name": "threads", "type": "array", "items": { "$ref": "ThreadInfo" }, "optional": true, "description": "Per-thread CPU usage information. Does not include the main thread." }
25             ]
26         }
27     ],
28     "commands": [
29         {
30             "name": "startTracking",
31             "description": "Start tracking cpu usage."
32         },
33         {
34             "name": "stopTracking",
35             "description": "Stop tracking cpu usage. This will produce a `trackingComplete` event."
36         }
37     ],
38     "events": [
39         {
40             "name": "trackingStart",
41             "description": "Tracking started.",
42             "parameters": [
43                 { "name": "timestamp", "type": "number" }
44             ]
45         },
46         {
47             "name": "trackingUpdate",
48             "description": "Periodic tracking updates with event data.",
49             "parameters": [
50                 { "name": "event", "$ref": "Event" }
51             ]
52         },
53         {
54             "name": "trackingComplete",
55             "description": "Tracking stopped.",
56             "parameters": [
57                 { "name": "timestamp", "type": "number" }
58             ]
59         }
60     ]
61 }