(page)
| 81 | } |
| 82 | |
| 83 | async function waitForBenchmark(page) { |
| 84 | return new Promise(resolve => { |
| 85 | const logs = []; |
| 86 | |
| 87 | page.on("console", async message => { |
| 88 | if (message.text() === "Benchmark complete") { |
| 89 | resolve(logs); |
| 90 | } else { |
| 91 | logs.push(message.text()); |
| 92 | } |
| 93 | }); |
| 94 | }); |
| 95 | } |
| 96 | |
| 97 | async function runBenchmark() { |
| 98 | const results = await runBrowsers(waitForBenchmark, "benchmark/index.html"); |