MCPcopy
hub / github.com/webpack/webpack / wrapWithInstrumentHooks

Function wrapWithInstrumentHooks

test/BenchmarkTestCases.benchmark.mjs:748–754  ·  view source on GitHub ↗
(fn, uri)

Source from the content-addressed store, hash-verified

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

Callers 1

runTaskSyncFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected