Commit fade4a46 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[inspector] added simple js-perf-test for inspector

This test checks how much time we spent for generating Debugger.paused notification.

R=machenbach@chromium.org

Bug: chromium:688036
Change-Id: Ie8a52aafe6c8d93401b0b2a90a202ddff7de78ef
Reviewed-on: https://chromium-review.googlesource.com/538584
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46035}
parent 4cf144dc
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
new BenchmarkSuite('Debugger.paused', [10000], [
new Benchmark('Debugger.paused', false, false, 0, DebuggerPaused, DebuggerEnable, DebuggerDisable),
]);
let lastId = 0;
function DebuggerEnable() {
send(JSON.stringify({id: ++lastId, method: 'Debugger.enable'}));
// force lazy compilation of inspector related scrtips
send(JSON.stringify({id: ++lastId, method: 'Runtime.evaluate', params: {expression: ''}}));
}
function DebuggerDisable() {
send(JSON.stringify({id: ++lastId, method: 'Debugger.disable'}));
}
function DebuggerPaused() {
for (var i = 0; i < 10; ++i) {
debugger;
}
}
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../base.js');
load('debugger.js');
var success = true;
function PrintResult(name, result) {
print(name + '-Inspector(Score): ' + result);
}
function PrintStep(name) {}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError,
NotifyStep: PrintStep });
......@@ -505,6 +505,17 @@
{"name": "StringConcat"},
{"name": "BitwiseOr"}
]
},
{
"name": "Inspector",
"path": ["Inspector"],
"main": "run.js",
"resources": [ "debugger.js" ],
"flags": ["--enable-inspector"],
"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