()
| 100 | } |
| 101 | |
| 102 | async function run() { |
| 103 | for (let i = 0; i < benchmarks.length; ++i) { |
| 104 | let runs = cli.optional.runs ?? 1; |
| 105 | const filename = benchmarks[i]; |
| 106 | if (format !== 'csv') { |
| 107 | console.log(); |
| 108 | console.log(filename); |
| 109 | } |
| 110 | |
| 111 | while (runs-- > 0) { |
| 112 | const start = performance.now(); |
| 113 | await runBenchmark(filename); |
| 114 | if (format !== 'csv' && cli.optional.track) { |
| 115 | const ms = styleText(['bold', 'yellow'], `${Math.round(performance.now() - start)}ms`); |
| 116 | console.log(`[${ms}] ${filename}`); |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | run(); |
no test coverage detected