(label, action)
| 240 | return result; |
| 241 | }; |
| 242 | const timedAsync = async (label, action) => { |
| 243 | const stageStarted = Date.now(); |
| 244 | const result = await action(); |
| 245 | timings.push([label, Date.now() - stageStarted]); |
| 246 | return result; |
| 247 | }; |
| 248 | const source = timed("read source", () => |
| 249 | fs.readFileSync(sourceFile, "utf8"), |
| 250 | ); |