1 | 'use strict';
|
2 |
|
3 | var extend = require('xtend');
|
4 | var debug = require('debug')('flowbench:flow');
|
5 |
|
6 | var Experiment = require('./experiment');
|
7 |
|
8 | var defaultOptions = {
|
9 | population: 1,
|
10 | maxConcurrentFlows: Infinity,
|
11 | requestDefaults: {
|
12 | pool: {
|
13 | maxSockets: Infinity
|
14 | },
|
15 | timeout: 10e3
|
16 | }
|
17 | };
|
18 |
|
19 | exports = 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 |
|
29 | exports.verify = require('./verify');
|
30 |
|
31 | exports.humanize = require('./humanize');
|
32 |
|
33 | function error(msg) {
|
34 | throw new Error(msg);
|
35 | } |
\ | No newline at end of file |