diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json')
-rw-r--r-- | Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json b/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json new file mode 100644 index 000000000..d01258dd5 --- /dev/null +++ b/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json @@ -0,0 +1,99 @@ +{ + "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", "description": "1-based." }, + { "name": "column", "type": "integer", "description": "1-based." } + ] + }, + { + "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", "description": "-1 if unavailable. 1-based if available." }, + { "name": "column", "type": "integer", "description": "-1 if unavailable. 1-based if available." }, + { "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": "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." } + ] + }, + { + "name": "programmaticCaptureStarted", + "description": "Fired when programmatic capture starts (console.profile). JSContext inspection only." + }, + { + "name": "programmaticCaptureStopped", + "description": "Fired when programmatic capture stops (console.profileEnd). JSContext inspection only." + } + ] +} |