(label, action)
| 234 | const started = Date.now(); |
| 235 | const timings = []; |
| 236 | const timed = (label, action) => { |
| 237 | const stageStarted = Date.now(); |
| 238 | const result = action(); |
| 239 | timings.push([label, Date.now() - stageStarted]); |
| 240 | return result; |
| 241 | }; |
| 242 | const timedAsync = async (label, action) => { |
| 243 | const stageStarted = Date.now(); |
| 244 | const result = await action(); |