(fn, uri)
| 632 | * @returns {Promise<ReturnType<Fn>>} result with instrument hooks |
| 633 | */ |
| 634 | const wrapWithInstrumentHooksAsync = async (fn, uri) => { |
| 635 | InstrumentHooks.startBenchmark(); |
| 636 | const result = await fn(); |
| 637 | InstrumentHooks.stopBenchmark(); |
| 638 | InstrumentHooks.setExecutedBenchmark(process.pid, uri); |
| 639 | return result; |
| 640 | }; |
| 641 | |
| 642 | /** |
| 643 | * @param {Task} task task |