1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
{
"domain": "ScriptProfiler",
"description": "Profiler domain exposes JavaScript evaluation timing and profiling.",
"types": [
{
"id": "EventType",
"type": "string",
"enum": ["API", "Microtask", "Other"]
},
{
"id": "Event",
"type": "object",
"properties": [
{ "name": "startTime", "type": "number" },
{ "name": "endTime", "type": "number" },
{ "name": "type", "$ref": "EventType" }
]
},
{
"id": "ExpressionLocation",
"type": "object",
"properties": [
{ "name": "line", "type": "integer" },
{ "name": "column", "type": "integer" }
]
},
{
"id": "StackFrame",
"type": "object",
"properties": [
{ "name": "sourceID", "$ref": "Debugger.ScriptId", "description": "Unique script identifier." },
{ "name": "name", "type": "string", "description": "A displayable name for the stack frame. i.e function name, (program), etc." },
{ "name": "line", "type": "integer" },
{ "name": "column", "type": "integer" },
{ "name": "url", "type": "string" },
{ "name": "expressionLocation", "$ref": "ExpressionLocation", "optional": true }
]
},
{
"id": "StackTrace",
"type": "object",
"properties": [
{ "name": "timestamp", "type": "number" },
{ "name": "stackFrames", "type": "array", "items": { "$ref": "StackFrame" }, "description": "First array item is the bottom of the call stack and last array item is the top of the call stack." }
]
},
{
"id": "Samples",
"type": "object",
"properties": [
{ "name": "totalTime", "type": "number", "description": "Total execution time of the profiler's data. (Note: not total elapsed time.)" },
{ "name": "stackTraces", "type": "array", "items": { "$ref": "StackTrace" } }
]
}
],
"commands": [
{
"name": "startTracking",
"description": "Start tracking script evaluations.",
"parameters": [
{ "name": "includeSamples", "type": "boolean", "optional": true, "description": "Start the sampling profiler, defaults to false." }
]
},
{
"name": "stopTracking",
"description": "Stop tracking script evaluations. This will produce a `trackingComplete` event."
}
],
"events": [
{
"name": "trackingStart",
"description": "Tracking started.",
"parameters": [
{ "name": "timestamp", "type": "number" }
]
},
{
"name": "trackingUpdate",
"description": "Periodic tracking updates with event data.",
"parameters": [
{ "name": "event", "$ref": "Event" }
]
},
{
"name": "trackingComplete",
"description": "Tracking stopped. Includes any buffered data during tracking, such as profiling information.",
"parameters": [
{ "name": "samples", "$ref": "Samples", "optional": true, "description": "Stack traces." }
]
}
]
}
|