Web Inspector: Add Heap domain start/stop tracking commands
[WebKit-https.git] / Source / JavaScriptCore / inspector / protocol / Heap.json
1 {
2     "domain": "Heap",
3     "description": "Heap domain exposes JavaScript heap attributes and capabilities.",
4     "types": [
5         {
6             "id": "GarbageCollection",
7             "description": "Information about a garbage collection.",
8             "type": "object",
9             "properties": [
10                 { "name": "type", "type": "string", "enum": ["full", "partial"], "description": "The type of garbage collection." },
11                 { "name": "startTime", "type": "number" },
12                 { "name": "endTime", "type": "number" }
13             ]
14         },
15         {
16             "id": "HeapSnapshotData",
17             "description": "JavaScriptCore HeapSnapshot JSON data.",
18             "type": "string"
19         }
20     ],
21     "commands": [
22         {
23             "name": "enable",
24             "description": "Enables Heap domain events."
25         },
26         {
27             "name": "disable",
28             "description": "Disables Heap domain events."
29         },
30         {
31             "name": "gc",
32             "description": "Trigger a full garbage collection."
33         },
34         {
35             "name": "snapshot",
36             "description": "Take a heap snapshot.",
37             "returns": [
38                 { "name": "timestamp", "type": "number" },
39                 { "name": "snapshotData", "$ref": "HeapSnapshotData" }
40             ]
41         },
42         {
43             "name": "startTracking",
44             "description": "Start tracking heap changes. This will produce a `trackingStart` event."
45         },
46         {
47             "name": "stopTracking",
48             "description": "Stop tracking heap changes. This will produce a `trackingComplete` event."
49         }
50     ],
51     "events": [
52         {
53             "name": "garbageCollected",
54             "description": "Information about the garbage collection.",
55             "parameters": [
56                 { "name": "collection", "type": "GarbageCollection" }
57             ]
58         },
59         {
60             "name": "trackingStart",
61             "description": "Tracking started.",
62             "parameters": [
63                 { "name": "timestamp", "type": "number" },
64                 { "name": "snapshotData", "$ref": "HeapSnapshotData", "description": "Snapshot at the start of tracking." }
65             ]
66         },
67         {
68             "name": "trackingComplete",
69             "description": "Tracking stopped.",
70             "parameters": [
71                 { "name": "timestamp", "type": "number" },
72                 { "name": "snapshotData", "$ref": "HeapSnapshotData", "description": "Snapshot at the end of tracking." }
73             ]
74         }
75     ]
76 }