Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: test/js-perf-test/Inspector/runtime.js

Issue 2962213002: Make String16 consturctors non-inline to save binary size (150kb) (Closed)
Patch Set: add perftest Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/js-perf-test/Inspector/runtime.js
diff --git a/test/js-perf-test/Inspector/runtime.js b/test/js-perf-test/Inspector/runtime.js
new file mode 100644
index 0000000000000000000000000000000000000000..5f6f8009653bbce830bcc12fbdc0a9996d93be81
--- /dev/null
+++ b/test/js-perf-test/Inspector/runtime.js
@@ -0,0 +1,26 @@
+// 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.
+
+(function() {
+ new BenchmarkSuite('Runtime.evaluate', [1000], [
+ new Benchmark('Runtime.evaluate', false, false, 0, EvaluateTest, Setup, TearDown),
+ ]);
+
+ function Setup() {
+ SendMessage('Debugger.enable');
kozy 2017/07/06 21:18:32 You don't need to enable Debugger to run Runtime.e
agrieve 2017/07/07 18:34:49 Done.
+ }
+
+ function TearDown() {
+ SendMessage('Debugger.disable');
+ }
+
+ function EvaluateTest() {
+ for (var i = 0; i < 10; ++i) {
+ let result = SendMessage('Runtime.evaluate', {expression: '"foo"'});
kozy 2017/07/06 21:18:32 I was experimenting with callgrind and tried to ma
agrieve 2017/07/07 18:34:49 Done.
+ if (result.result.result.value != 'foo') {
+ throw new Error('eval response was: ' + JSON.stringify(result.result));
+ }
+ }
+ }
+})();

Powered by Google App Engine
This is Rietveld 408576698