autocannon-compare

0.4.0 • Public • Published

Autocannon

autocannon-compare

Compare two autocannon runs, using ttest.

Install

Locally, for API usage

npm i autocannon-compare --save

Globally, for CLI usage

npm i autocannon-compare -g

API

compare(a, b)

Compare the result of two autocannon run. It will tell how different is the a run compared to tbe b run.

{
  "requests": {
    "difference": "980.33%",
    "pValue": 0,
    "significant": "***"
  },
  "throughput": {
    "difference": "976.68%",
    "pValue": 0,
    "significant": "***"
  },
  "latency": {
    "difference": "-98.91%",
    "pValue": 0,
    "significant": "***"
  },
  "aWins": true,
  "bWins": false,
  "equal": false
}

Example

const compare = require('autocannon-compare')
const resA = require('./result-a')
const resB = require('./result-b')
 
console.log(compare(resA, resB))

CLI

$ autocannon-compare fixture-a.json fixture-b.json
{
  "requests": {
    "difference": "980.33%",
    "pValue": 0,
    "significant": "***"
  },
  "throughput": {
    "difference": "976.68%",
    "pValue": 0,
    "significant": "***"
  },
  "latency": {
    "difference": "-98.91%",
    "pValue": 0,
    "significant": "***"
  },
  "aWins": true,
  "bWins": false,
  "equal": false
}

Acknowledgements

This project was kindly sponsored by nearForm.

License

Copyright Matteo Collina, Licensed under MIT.

Package Sidebar

Install

npm i autocannon-compare

Weekly Downloads

1,086

Version

0.4.0

License

MIT

Unpacked Size

9.52 kB

Total Files

8

Last publish

Collaborators

  • matteo.collina