Commit 7345bfcc authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[inspector] perf test for inspector async instrumentation

Prior langing massive async instrumentation refactoring let's add a perf
test to track our progress.

R=dgozman@chromium.org

Bug: v8:7078
Change-Id: I11e1ec962a9f384c2c778061c48935ac410fbe53
Reviewed-on: https://chromium-review.googlesource.com/766647Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49365}
parent 9a4b334f
......@@ -13,6 +13,9 @@
benchy('Debugger.getPossibleBreakpoints',
DebuggerGetPossibleBreakpoints,
SetupGetPossibleBreakpoints);
benchy('AsyncStacksInstrumentation',
AsyncStacksInstrumentation,
SetupAsyncStacksInstrumentation);
function Setup() {
SendMessage('Debugger.enable');
......@@ -57,4 +60,20 @@
start: {lineNumber: 0, columnNumber: 0, scriptId: scriptId}
});
}
function SetupAsyncStacksInstrumentation() {
Setup();
SendMessage('Debugger.setAsyncCallStackDepth', {maxDepth: 1024});
}
function AsyncStacksInstrumentation() {
var p = Promise.resolve();
var nopCallback = () => undefined;
var done = false;
for (let i = 0; i < 1000; ++i) {
p = p.then(nopCallback);
}
p = p.then(() => done = true);
while (!done) %RunMicrotasks();
}
})();
......@@ -602,7 +602,7 @@
"path": ["Inspector"],
"main": "run.js",
"resources": [ "debugger.js", "runtime.js" ],
"flags": ["--enable-inspector"],
"flags": ["--enable-inspector","--allow-natives-syntax"],
"results_regexp": "^%s\\-Inspector\\(Score\\): (.+)$",
"tests": [
{"name": "Debugger.paused"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment