()
| 138 | } |
| 139 | |
| 140 | async function cliMain(): Promise<void> { |
| 141 | const benchArgs = resolveAndValidateArgs(process.argv.slice(2)); |
| 142 | |
| 143 | if (benchArgs === undefined) { |
| 144 | console.log(USAGE); |
| 145 | return; |
| 146 | } |
| 147 | |
| 148 | try { |
| 149 | await runBenchmark(benchArgs); |
| 150 | } catch (error) { |
| 151 | if (!(error instanceof Error)) { |
| 152 | throw error; |
| 153 | } |
| 154 | |
| 155 | logError(error.message); |
| 156 | process.exit(1); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | function buildHyperfineCommand( |
| 161 | command: string, |
no test coverage detected