Web Inspector: Timelines: can't reliably stop/start a recording
[WebKit-https.git] / Source / JavaScriptCore / inspector / protocol / Memory.json
1 {
2     "domain": "Memory",
3     "description": "Memory domain exposes page memory tracking.",
4     "featureGuard": "ENABLE(RESOURCE_USAGE)",
5     "availability": ["web"],
6     "types": [
7         {
8             "id": "Event",
9             "type": "object",
10             "properties": [
11                 { "name": "timestamp", "type": "number" },
12                 { "name": "categories", "type": "array", "items": { "$ref": "CategoryData" }, "description": "Breakdown of memory in categories." }
13             ]
14         },
15         {
16             "id": "CategoryData",
17             "type": "object",
18             "properties": [
19                 { "name": "type", "type": "string", "enum": ["javascript", "jit", "images", "layers", "page", "other"], "description": "Category type." },
20                 { "name": "size", "type": "number", "description": "Category size in bytes." }
21             ]
22         }
23     ],
24     "commands": [
25         {
26             "name": "enable",
27             "description": "Enables Memory domain events."
28         },
29         {
30             "name": "disable",
31             "description": "Disables Memory domain events."
32         },
33         {
34             "name": "startTracking",
35             "description": "Start tracking memory. This will produce a `trackingStart` event."
36         },
37         {
38             "name": "stopTracking",
39             "description": "Stop tracking memory. This will produce a `trackingComplete` event."
40         }
41     ],
42     "events": [
43         {
44             "name": "memoryPressure",
45             "description": "Memory pressure was encountered.",
46             "parameters": [
47                 { "name": "timestamp", "type": "number" },
48                 { "name": "severity", "type": "string", "enum": ["critical", "non-critical"], "description": "The severity of the memory pressure event." }
49             ]
50         },
51         {
52             "name": "trackingStart",
53             "description": "Tracking started.",
54             "parameters": [
55                 { "name": "timestamp", "type": "number" }
56             ]
57         },
58         {
59             "name": "trackingUpdate",
60             "description": "Periodic tracking updates with event data.",
61             "parameters": [
62                 { "name": "event", "$ref": "Event" }
63             ]
64         },
65         {
66             "name": "trackingComplete",
67             "description": "Tracking stopped.",
68             "parameters": [
69                 { "name": "timestamp", "type": "number" }
70             ]
71         }
72     ]
73 }