(fn, uri)
| 746 | * @returns {ReturnType<Fn>} result with instrument hooks |
| 747 | */ |
| 748 | const wrapWithInstrumentHooks = (fn, uri) => { |
| 749 | InstrumentHooks.startBenchmark(); |
| 750 | const result = fn(); |
| 751 | InstrumentHooks.stopBenchmark(); |
| 752 | InstrumentHooks.setExecutedBenchmark(process.pid, uri); |
| 753 | return result; |
| 754 | }; |
| 755 | |
| 756 | /** |
| 757 | * @param {Task} task task |