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 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.
| |
12 } | |
13 | |
14 function TearDown() { | |
15 SendMessage('Debugger.disable'); | |
16 } | |
17 | |
18 function EvaluateTest() { | |
19 for (var i = 0; i < 10; ++i) { | |
20 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.
| |
21 if (result.result.result.value != 'foo') { | |
22 throw new Error('eval response was: ' + JSON.stringify(result.result)); | |
23 } | |
24 } | |
25 } | |
26 })(); | |
OLD | NEW |