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

Method http

benchmark/common.js:180–198  ·  view source on GitHub ↗
(options, cb)

Source from the content-addressed store, hash-verified

178 }
179
180 http(options, cb) {
181 const http_options = { ...options };
182 http_options.benchmarker ||= this.config.benchmarker ||
183 this.extra_options.benchmarker ||
184 http_benchmarkers.default_http_benchmarker;
185 http_benchmarkers.run(
186 http_options, (error, code, used_benchmarker, result, elapsed) => {
187 if (cb) {
188 cb(code);
189 }
190 if (error) {
191 console.error(error);
192 process.exit(code || 1);
193 }
194 this.config.benchmarker = used_benchmarker;
195 this.report(result, elapsed);
196 },
197 );
198 }
199
200 _run() {
201 // If forked, report to the parent.

Callers 15

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 5

reportMethod · 0.95
cbFunction · 0.50
runMethod · 0.45
errorMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected