Chromium Code Reviews| 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 new BenchmarkSuite('Debugger.paused', [10000], [ | 5 (function() { |
| 6 new Benchmark('Debugger.paused', false, false, 0, DebuggerPaused, DebuggerEnab le, DebuggerDisable), | 6 new BenchmarkSuite('Debugger.paused', [10000], [ |
| 7 ]); | 7 new Benchmark('Debugger.paused', false, false, 0, DebuggerPaused, Setup, Tea rDown), |
| 8 ]); | |
| 8 | 9 |
| 9 let lastId = 0; | 10 function Setup() { |
| 10 function DebuggerEnable() { | 11 SendMessage('Debugger.enable'); |
|
kozy
2017/07/06 21:18:31
Please bring back:
// force lazy compilation of in
agrieve
2017/07/07 18:34:49
Whoops! Done
| |
| 11 send(JSON.stringify({id: ++lastId, method: 'Debugger.enable'})); | 12 } |
| 12 // force lazy compilation of inspector related scrtips | |
| 13 send(JSON.stringify({id: ++lastId, method: 'Runtime.evaluate', params: {expres sion: ''}})); | |
| 14 } | |
| 15 | 13 |
| 16 function DebuggerDisable() { | 14 function TearDown() { |
| 17 send(JSON.stringify({id: ++lastId, method: 'Debugger.disable'})); | 15 SendMessage('Debugger.disable'); |
| 18 } | 16 } |
| 19 | 17 |
| 20 function DebuggerPaused() { | 18 function DebuggerPaused() { |
| 21 for (var i = 0; i < 10; ++i) { | 19 for (var i = 0; i < 10; ++i) { |
| 22 debugger; | 20 debugger; |
| 21 } | |
| 23 } | 22 } |
| 24 } | 23 })(); |
| OLD | NEW |