OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 (function() { |
| 6 new BenchmarkSuite('Runtime.evaluate', [1000], [ |
| 7 new Benchmark('Runtime.evaluate', false, false, 0, EvaluateTest, Setup, Tear
Down), |
| 8 ]); |
| 9 |
| 10 function Setup() { |
| 11 // Force lazy compilation of inspector related scripts. |
| 12 SendMessage('Runtime.evaluate', {expression: ''}); |
| 13 } |
| 14 |
| 15 function TearDown() { |
| 16 } |
| 17 |
| 18 function EvaluateTest() { |
| 19 // This is meant to exercise the overhead of v8_inspector::String16 |
| 20 // constructors. https://crbug.com/738469 |
| 21 for (var i = 0; i < 10; ++i) { |
| 22 SendMessage('Runtime.evaluate', {expression: '({})', returnByValue: true})
; |
| 23 } |
| 24 } |
| 25 })(); |
OLD | NEW |