1{ 2 "$schema": "http://json-schema.org/draft-07/schema#", 3 "definitions": { 4 "CloseFrameEvent": { 5 "properties": { 6 "at": { 7 "title": "at", 8 "type": "number" 9 }, 10 "frame": { 11 "title": "frame", 12 "type": "number" 13 }, 14 "type": { 15 "enum": [ 16 "C" 17 ], 18 "title": "type", 19 "type": "string" 20 } 21 }, 22 "required": [ 23 "at", 24 "frame", 25 "type" 26 ], 27 "title": "CloseFrameEvent", 28 "type": "object" 29 }, 30 "FileFormat.EventType": { 31 "enum": [ 32 "C", 33 "O" 34 ], 35 "title": "FileFormat.EventType", 36 "type": "string" 37 }, 38 "FileFormat.EventedProfile": { 39 "properties": { 40 "endValue": { 41 "title": "endValue", 42 "type": "number" 43 }, 44 "events": { 45 "items": { 46 "anyOf": [ 47 { 48 "$ref": "#/definitions/OpenFrameEvent" 49 }, 50 { 51 "$ref": "#/definitions/CloseFrameEvent" 52 } 53 ] 54 }, 55 "title": "events", 56 "type": "array" 57 }, 58 "name": { 59 "title": "name", 60 "type": "string" 61 }, 62 "startValue": { 63 "title": "startValue", 64 "type": "number" 65 }, 66 "type": { 67 "enum": [ 68 "evented" 69 ], 70 "title": "type", 71 "type": "string" 72 }, 73 "unit": { 74 "$ref": "#/definitions/FileFormat.ValueUnit", 75 "title": "unit" 76 } 77 }, 78 "required": [ 79 "endValue", 80 "events", 81 "name", 82 "startValue", 83 "type", 84 "unit" 85 ], 86 "title": "FileFormat.EventedProfile", 87 "type": "object" 88 }, 89 "FileFormat.File": { 90 "properties": { 91 "$schema": { 92 "enum": [ 93 "https://www.speedscope.app/file-format-schema.json" 94 ], 95 "title": "$schema", 96 "type": "string" 97 }, 98 "activeProfileIndex": { 99 "title": "activeProfileIndex", 100 "type": "number" 101 }, 102 "exporter": { 103 "title": "exporter", 104 "type": "string" 105 }, 106 "name": { 107 "title": "name", 108 "type": "string" 109 }, 110 "profiles": { 111 "items": { 112 "anyOf": [ 113 { 114 "$ref": "#/definitions/FileFormat.EventedProfile" 115 }, 116 { 117 "$ref": "#/definitions/FileFormat.SampledProfile" 118 } 119 ] 120 }, 121 "title": "profiles", 122 "type": "array" 123 }, 124 "shared": { 125 "properties": { 126 "frames": { 127 "items": { 128 "$ref": "#/definitions/FileFormat.Frame" 129 }, 130 "title": "frames", 131 "type": "array" 132 } 133 }, 134 "required": [ 135 "frames" 136 ], 137 "title": "shared", 138 "type": "object" 139 } 140 }, 141 "required": [ 142 "$schema", 143 "profiles", 144 "shared" 145 ], 146 "title": "FileFormat.File", 147 "type": "object" 148 }, 149 "FileFormat.Frame": { 150 "properties": { 151 "col": { 152 "title": "col", 153 "type": "number" 154 }, 155 "file": { 156 "title": "file", 157 "type": "string" 158 }, 159 "line": { 160 "title": "line", 161 "type": "number" 162 }, 163 "name": { 164 "title": "name", 165 "type": "string" 166 } 167 }, 168 "required": [ 169 "name" 170 ], 171 "title": "FileFormat.Frame", 172 "type": "object" 173 }, 174 "FileFormat.IProfile": { 175 "properties": { 176 "type": { 177 "$ref": "#/definitions/FileFormat.ProfileType", 178 "title": "type" 179 } 180 }, 181 "required": [ 182 "type" 183 ], 184 "title": "FileFormat.IProfile", 185 "type": "object" 186 }, 187 "FileFormat.Profile": { 188 "anyOf": [ 189 { 190 "$ref": "#/definitions/FileFormat.EventedProfile" 191 }, 192 { 193 "$ref": "#/definitions/FileFormat.SampledProfile" 194 } 195 ] 196 }, 197 "FileFormat.ProfileType": { 198 "enum": [ 199 "evented", 200 "sampled" 201 ], 202 "title": "FileFormat.ProfileType", 203 "type": "string" 204 }, 205 "FileFormat.SampledProfile": { 206 "properties": { 207 "endValue": { 208 "title": "endValue", 209 "type": "number" 210 }, 211 "name": { 212 "title": "name", 213 "type": "string" 214 }, 215 "samples": { 216 "items": { 217 "items": { 218 "type": "number" 219 }, 220 "type": "array" 221 }, 222 "title": "samples", 223 "type": "array" 224 }, 225 "startValue": { 226 "title": "startValue", 227 "type": "number" 228 }, 229 "type": { 230 "enum": [ 231 "sampled" 232 ], 233 "title": "type", 234 "type": "string" 235 }, 236 "unit": { 237 "$ref": "#/definitions/FileFormat.ValueUnit", 238 "title": "unit" 239 }, 240 "weights": { 241 "items": { 242 "type": "number" 243 }, 244 "title": "weights", 245 "type": "array" 246 } 247 }, 248 "required": [ 249 "endValue", 250 "name", 251 "samples", 252 "startValue", 253 "type", 254 "unit", 255 "weights" 256 ], 257 "title": "FileFormat.SampledProfile", 258 "type": "object" 259 }, 260 "FileFormat.ValueUnit": { 261 "enum": [ 262 "bytes", 263 "microseconds", 264 "milliseconds", 265 "nanoseconds", 266 "none", 267 "seconds" 268 ], 269 "title": "FileFormat.ValueUnit", 270 "type": "string" 271 }, 272 "IEvent": { 273 "properties": { 274 "at": { 275 "title": "at", 276 "type": "number" 277 }, 278 "type": { 279 "$ref": "#/definitions/FileFormat.EventType", 280 "title": "type" 281 } 282 }, 283 "required": [ 284 "at", 285 "type" 286 ], 287 "title": "IEvent", 288 "type": "object" 289 }, 290 "OpenFrameEvent": { 291 "properties": { 292 "at": { 293 "title": "at", 294 "type": "number" 295 }, 296 "frame": { 297 "title": "frame", 298 "type": "number" 299 }, 300 "type": { 301 "enum": [ 302 "O" 303 ], 304 "title": "type", 305 "type": "string" 306 } 307 }, 308 "required": [ 309 "at", 310 "frame", 311 "type" 312 ], 313 "title": "OpenFrameEvent", 314 "type": "object" 315 }, 316 "SampledStack": { 317 "items": { 318 "type": "number" 319 }, 320 "type": "array" 321 } 322 }, 323 "$ref": "#/definitions/FileFormat.File" 324} 325