UNPKG

723 BJavaScriptView Raw
1'use strict';
2
3var extend = require('xtend');
4var debug = require('debug')('flowbench:flow');
5
6var Experiment = require('./experiment');
7
8var defaultOptions = {
9 population: 1,
10 maxConcurrentFlows: Infinity,
11 requestDefaults: {
12 pool: {
13 maxSockets: Infinity
14 },
15 timeout: 10e3
16 }
17};
18
19exports = module.exports = function Flowbench(options) {
20
21 debug('experiment with options %j', options);
22 options = extend({}, defaultOptions, options);
23 options.requestDefaults = extend(
24 {}, defaultOptions.requestDefaults, options.requestDefaults);
25
26 return Experiment(options);
27}
28
29exports.verify = require('./verify');
30
31exports.humanize = require('./humanize');
32
33function error(msg) {
34 throw new Error(msg);
35}
\No newline at end of file