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

Function sendResult

benchmark/common.js:326–342  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

324}
325
326function sendResult(data) {
327 if (process.send) {
328 // If forked, report by process send
329 process.send(data, () => {
330 if (process.env.NODE_RUN_BENCHMARK_FN !== undefined) {
331 // If, for any reason, the process is unable to self close within
332 // a second after completing, forcefully close it.
333 require('timers').setTimeout(() => {
334 process.exit(0);
335 }, 5000).unref();
336 }
337 });
338 } else {
339 // Otherwise report by stdout
340 process.stdout.write(formatResult(data));
341 }
342}
343
344const urls = {
345 long: 'http://nodejs.org:89/docs/latest/api/foo/bar/qua/13949281/0f28b/' +

Callers 1

reportMethod · 0.85

Calls 7

formatResultFunction · 0.85
sendMethod · 0.65
requireFunction · 0.50
unrefMethod · 0.45
setTimeoutMethod · 0.45
exitMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…