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

Function main

benchmark/http/set-header.js:18–33  ·  view source on GitHub ↗
({ res, duration })

Source from the content-addressed store, hash-verified

16// setHeader: statusCode = status, setHeader(...) x2
17// setHeaderWH: setHeader(...), writeHead(status, ...)
18function main({ res, duration }) {
19 const server = require('../fixtures/simple-http-server.js')
20 .listen(0)
21 .on('listening', () => {
22 const path = `/${type}/${len}/${chunks}/${res}/${chunkedEnc}`;
23
24 bench.http({
25 path: path,
26 connections: c,
27 duration,
28 port: server.address().port,
29 }, () => {
30 server.close();
31 });
32 });
33}

Callers

nothing calls this directly

Calls 6

listenMethod · 0.80
httpMethod · 0.80
addressMethod · 0.65
closeMethod · 0.65
requireFunction · 0.50
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…