autocannon icon indicating copy to clipboard operation
autocannon copied to clipboard

How to use aggregateResult?

Open wsierakowski opened this issue 6 months ago • 0 comments

I have the following script:

const autocannon = require('autocannon');

const test = async () => {
  const result1 = await autocannon({
    url: 'https://google.com',
    connections: 10, //default
    pipelining: 1, // default
    duration: 10, // default
    skipAggregateResult: true
  });

  const result2 = await autocannon({
    url: 'https://microsoft.com',
    connections: 10, //default
    pipelining: 1, // default
    duration: 10, // default
    skipAggregateResult: true
  });

  autocannon.aggregateResult([result1, result2]);
};

test();

This returns:

node_modules/autocannon/lib/validate.js:88
    return new Error('url or socketPath option required')

wsierakowski avatar Dec 19 '23 18:12 wsierakowski