OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 load('../base.js'); | 5 load('../base.js'); |
6 | 6 |
7 load('debugger.js'); | 7 load('debugger.js'); |
| 8 load('runtime.js'); |
8 | 9 |
9 var success = true; | 10 let success = true; |
| 11 let lastId = 0; |
10 | 12 |
11 function PrintResult(name, result) { | 13 function PrintResult(name, result) { |
12 print(name + '-Inspector(Score): ' + result); | 14 print(name + '-Inspector(Score): ' + result); |
13 } | 15 } |
14 | 16 |
15 function PrintStep(name) {} | 17 function PrintStep(name) {} |
16 | 18 |
17 function PrintError(name, error) { | 19 function PrintError(name, error) { |
18 PrintResult(name, error); | 20 PrintResult(name, error); |
19 success = false; | 21 success = false; |
20 } | 22 } |
21 | 23 |
22 | 24 |
23 BenchmarkSuite.config.doWarmup = undefined; | 25 BenchmarkSuite.config.doWarmup = undefined; |
24 BenchmarkSuite.config.doDeterministic = undefined; | 26 BenchmarkSuite.config.doDeterministic = undefined; |
25 | 27 |
26 BenchmarkSuite.RunSuites({ NotifyResult: PrintResult, | 28 BenchmarkSuite.RunSuites({ NotifyResult: PrintResult, |
27 NotifyError: PrintError, | 29 NotifyError: PrintError, |
28 NotifyStep: PrintStep }); | 30 NotifyStep: PrintStep }); |
| 31 |
| 32 function SendMessage(method, params) { |
| 33 let obj = {id: ++lastId, method: method}; |
| 34 if (params) { |
| 35 obj.params = params; |
| 36 } |
| 37 send(JSON.stringify(obj)); |
| 38 } |
OLD | NEW |