• Home
  • Raw
  • Download

Lines Matching full:options

22   create(options) {  argument
24 '-d', options.duration,
25 '-c', options.connections,
29 for (const field in options.headers) {
30 args.push('-H', `${field}=${options.headers[field]}`);
32 const scheme = options.scheme || 'http';
33 args.push(`${scheme}://127.0.0.1:${options.port}${options.path}`);
60 create(options) { argument
61 const duration = typeof options.duration === 'number' ?
62 Math.max(options.duration, 1) :
63 options.duration;
64 const scheme = options.scheme || 'http';
67 '-c', options.connections,
68 '-t', Math.min(options.connections, require('os').cpus().length || 8),
69 `${scheme}://127.0.0.1:${options.port}${options.path}`,
71 for (const field in options.headers) {
72 args.push('-H', `${field}: ${options.headers[field]}`);
103 create(options) { argument
104 process.env.duration = process.env.duration || options.duration || 5;
106 const scheme = options.scheme || 'http';
108 test_url: `${scheme}://127.0.0.1:${options.port}${options.path}`,
140 create(options) { argument
142 if (typeof options.requests === 'number')
143 args.push('-n', options.requests);
144 if (typeof options.clients === 'number')
145 args.push('-c', options.clients);
146 if (typeof options.threads === 'number')
147 args.push('-t', options.threads);
148 if (typeof options.maxConcurrentStreams === 'number')
149 args.push('-m', options.maxConcurrentStreams);
150 if (typeof options.initialWindowSize === 'number')
151 args.push('-w', options.initialWindowSize);
152 if (typeof options.sessionInitialWindowSize === 'number')
153 args.push('-W', options.sessionInitialWindowSize);
154 if (typeof options.rate === 'number')
155 args.push('-r', options.rate);
156 if (typeof options.ratePeriod === 'number')
157 args.push(`--rate-period=${options.ratePeriod}`);
158 if (typeof options.duration === 'number')
159 args.push('-T', options.duration);
160 if (typeof options.timeout === 'number')
161 args.push('-N', options.timeout);
162 if (typeof options.headerTableSize === 'number')
163 args.push(`--header-table-size=${options.headerTableSize}`);
164 if (typeof options.encoderHeaderTableSize === 'number') {
166 `--encoder-header-table-size=${options.encoderHeaderTableSize}`);
168 const scheme = options.scheme || 'http';
169 const host = options.host || '127.0.0.1';
170 args.push(`${scheme}://${host}:${options.port}${options.path}`);
199 exports.run = function(options, callback) { argument
200 options = { variable
206 ...options
208 if (!options.benchmarker) {
213 const benchmarker = benchmarkers[options.benchmarker];
215 callback(new Error(`Requested benchmarker '${options.benchmarker}' ` +
220 callback(new Error(`Requested benchmarker '${options.benchmarker}' ` +
227 const child = benchmarker.create(options);
238 let error_message = `${options.benchmarker} failed with ${code}.`;
249 `${options.benchmarker} produced strange output: ${stdout}`), code);
254 callback(null, code, options.benchmarker, result, elapsed);