MCPcopy Index your code
hub / github.com/nodejs/node / timerified

Function timerified

lib/internal/perf/timerify.js:71–89  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

69 }
70
71 function timerified(...args) {
72 const isConstructorCall = new.target !== undefined;
73 const start = now();
74 const result = isConstructorCall ?
75 ReflectConstruct(fn, args, fn) :
76 ReflectApply(fn, this, args);
77 if (!isConstructorCall && typeof result?.finally === 'function') {
78 return result.finally(
79 FunctionPrototypeBind(
80 processComplete,
81 result,
82 fn.name,
83 start,
84 args,
85 histogram));
86 }
87 processComplete(fn.name, start, args, histogram);
88 return result;
89 }
90
91 ObjectDefineProperties(timerified, {
92 length: {

Calls 2

processCompleteFunction · 0.85
nowFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…