OLD | NEW |
(Empty) | |
| 1 { |
| 2 "domain": "HeapProfiler", |
| 3 "version": { |
| 4 "major": "1", |
| 5 "minor": "1" |
| 6 }, |
| 7 "dependencies": [ |
| 8 "Runtime" |
| 9 ], |
| 10 "hidden": true, |
| 11 "types": [ |
| 12 { |
| 13 "id": "HeapSnapshotObjectId", |
| 14 "type": "string", |
| 15 "description": "Heap snapshot object id." |
| 16 }, |
| 17 { |
| 18 "id": "SamplingHeapProfileNode", |
| 19 "type": "object", |
| 20 "description": "Sampling Heap Profile node. Holds callsite informati
on, allocation statistics and child nodes.", |
| 21 "properties": [ |
| 22 { |
| 23 "name": "functionName", |
| 24 "type": "string", |
| 25 "description": "Function name." |
| 26 }, |
| 27 { |
| 28 "name": "scriptId", |
| 29 "$ref": "Runtime.ScriptId", |
| 30 "description": "Script identifier." |
| 31 }, |
| 32 { |
| 33 "name": "url", |
| 34 "type": "string", |
| 35 "description": "URL." |
| 36 }, |
| 37 { |
| 38 "name": "lineNumber", |
| 39 "type": "integer", |
| 40 "description": "1-based line number of the function start po
sition." |
| 41 }, |
| 42 { |
| 43 "name": "columnNumber", |
| 44 "type": "integer", |
| 45 "description": "1-based column number of the function start
position." |
| 46 }, |
| 47 { |
| 48 "name": "selfSize", |
| 49 "type": "number", |
| 50 "description": "Allocations size in bytes for the node exclu
ding children." |
| 51 }, |
| 52 { |
| 53 "name": "children", |
| 54 "type": "array", |
| 55 "items": { |
| 56 "$ref": "SamplingHeapProfileNode" |
| 57 }, |
| 58 "description": "Child nodes." |
| 59 } |
| 60 ] |
| 61 }, |
| 62 { |
| 63 "id": "SamplingHeapProfile", |
| 64 "type": "object", |
| 65 "description": "Profile.", |
| 66 "properties": [ |
| 67 { |
| 68 "name": "head", |
| 69 "$ref": "SamplingHeapProfileNode" |
| 70 } |
| 71 ] |
| 72 } |
| 73 ], |
| 74 "commands": [ |
| 75 { |
| 76 "name": "enable" |
| 77 }, |
| 78 { |
| 79 "name": "disable" |
| 80 }, |
| 81 { |
| 82 "name": "startTrackingHeapObjects", |
| 83 "parameters": [ |
| 84 { |
| 85 "name": "trackAllocations", |
| 86 "type": "boolean", |
| 87 "optional": true |
| 88 } |
| 89 ] |
| 90 }, |
| 91 { |
| 92 "name": "stopTrackingHeapObjects", |
| 93 "parameters": [ |
| 94 { |
| 95 "name": "reportProgress", |
| 96 "type": "boolean", |
| 97 "optional": true, |
| 98 "description": "If true 'reportHeapSnapshotProgress' events
will be generated while snapshot is being taken when the tracking is stopped." |
| 99 } |
| 100 ] |
| 101 }, |
| 102 { |
| 103 "name": "takeHeapSnapshot", |
| 104 "parameters": [ |
| 105 { |
| 106 "name": "reportProgress", |
| 107 "type": "boolean", |
| 108 "optional": true, |
| 109 "description": "If true 'reportHeapSnapshotProgress' events
will be generated while snapshot is being taken." |
| 110 } |
| 111 ] |
| 112 }, |
| 113 { |
| 114 "name": "collectGarbage" |
| 115 }, |
| 116 { |
| 117 "name": "getObjectByHeapObjectId", |
| 118 "parameters": [ |
| 119 { |
| 120 "name": "objectId", |
| 121 "$ref": "HeapSnapshotObjectId" |
| 122 }, |
| 123 { |
| 124 "name": "objectGroup", |
| 125 "type": "string", |
| 126 "optional": true, |
| 127 "description": "Symbolic group name that can be used to rele
ase multiple objects." |
| 128 } |
| 129 ], |
| 130 "returns": [ |
| 131 { |
| 132 "name": "result", |
| 133 "$ref": "Runtime.RemoteObject", |
| 134 "description": "Evaluation result." |
| 135 } |
| 136 ] |
| 137 }, |
| 138 { |
| 139 "name": "addInspectedHeapObject", |
| 140 "parameters": [ |
| 141 { |
| 142 "name": "heapObjectId", |
| 143 "$ref": "HeapSnapshotObjectId", |
| 144 "description": "Heap snapshot object id to be accessible by
means of $x command line API." |
| 145 } |
| 146 ], |
| 147 "description": "Enables console to refer to the node with given id v
ia $x (see Command Line API for more details $x functions)." |
| 148 }, |
| 149 { |
| 150 "name": "getHeapObjectId", |
| 151 "parameters": [ |
| 152 { |
| 153 "name": "objectId", |
| 154 "$ref": "Runtime.RemoteObjectId", |
| 155 "description": "Identifier of the object to get heap object
id for." |
| 156 } |
| 157 ], |
| 158 "returns": [ |
| 159 { |
| 160 "name": "heapSnapshotObjectId", |
| 161 "$ref": "HeapSnapshotObjectId", |
| 162 "description": "Id of the heap snapshot object corresponding
to the passed remote object id." |
| 163 } |
| 164 ] |
| 165 }, |
| 166 { |
| 167 "name": "startSampling", |
| 168 "parameters": [ |
| 169 { |
| 170 "name": "samplingInterval", |
| 171 "type": "number", |
| 172 "optional": true, |
| 173 "description": "Average sample interval in bytes. Poisson di
stribution is used for the intervals. The default value is 32768 bytes." |
| 174 } |
| 175 ] |
| 176 }, |
| 177 { |
| 178 "name": "stopSampling", |
| 179 "returns": [ |
| 180 { |
| 181 "name": "profile", |
| 182 "$ref": "SamplingHeapProfile", |
| 183 "description": "Recorded sampling heap profile." |
| 184 } |
| 185 ] |
| 186 } |
| 187 ], |
| 188 "events": [ |
| 189 { |
| 190 "name": "addHeapSnapshotChunk", |
| 191 "parameters": [ |
| 192 { |
| 193 "name": "chunk", |
| 194 "type": "string" |
| 195 } |
| 196 ] |
| 197 }, |
| 198 { |
| 199 "name": "resetProfiles" |
| 200 }, |
| 201 { |
| 202 "name": "reportHeapSnapshotProgress", |
| 203 "parameters": [ |
| 204 { |
| 205 "name": "done", |
| 206 "type": "integer" |
| 207 }, |
| 208 { |
| 209 "name": "total", |
| 210 "type": "integer" |
| 211 }, |
| 212 { |
| 213 "name": "finished", |
| 214 "type": "boolean", |
| 215 "optional": true |
| 216 } |
| 217 ] |
| 218 }, |
| 219 { |
| 220 "name": "lastSeenObjectId", |
| 221 "description": "If heap objects tracking has been started then backe
nd regulary sends a current value for last seen object id and corresponding time
stamp. If the were changes in the heap since last event then one or more heapSta
tsUpdate events will be sent before a new lastSeenObjectId event.", |
| 222 "parameters": [ |
| 223 { |
| 224 "name": "lastSeenObjectId", |
| 225 "type": "integer" |
| 226 }, |
| 227 { |
| 228 "name": "timestamp", |
| 229 "type": "number" |
| 230 } |
| 231 ] |
| 232 }, |
| 233 { |
| 234 "name": "heapStatsUpdate", |
| 235 "description": "If heap objects tracking has been started then backe
nd may send update for one or more fragments", |
| 236 "parameters": [ |
| 237 { |
| 238 "name": "statsUpdate", |
| 239 "type": "array", |
| 240 "items": { |
| 241 "type": "integer" |
| 242 }, |
| 243 "description": "An array of triplets. Each triplet describes
a fragment. The first integer is the fragment index, the second integer is a to
tal count of objects for the fragment, the third integer is a total size of the
objects for the fragment." |
| 244 } |
| 245 ] |
| 246 } |
| 247 ] |
| 248 } |
OLD | NEW |