# autocannon-compare

> Compare two autocannon runs Edit

Latest version **0.4.0** (published 2019-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install autocannon-compare
pnpm add autocannon-compare
yarn add autocannon-compare
bun add autocannon-compare
```

Provides the command `autocannon-compare`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2019-03-15 |
| First published | 2017-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Matteo Collina |
| Maintainers | matteo.collina |
| Keywords | autocannon, http, benchmark, soak, load, compare, ttest |

## Links

- npm: https://www.npmjs.com/package/autocannon-compare
- Repository: https://github.com/mcollina/autocannon-compare
- Homepage: https://github.com/mcollina/autocannon-compare#readme
- Issues: https://github.com/mcollina/autocannon-compare/issues
- npm.io page: https://npm.io/package/autocannon-compare

## Dependencies (1)

- [ttest](https://npm.io/package/ttest.md) ^2.0.0

## Recent versions

- 0.4.0 (latest) — 2019-03-15
- 0.3.0 — 2017-09-29
- 0.2.0 — 2017-02-17
- 0.1.2 — 2017-02-16
- 0.1.1 — 2017-02-16
- 0.1.0 — 2017-02-16

## README

![Autocannon](https://raw.githubusercontent.com/mcollina/autocannon/master/autocannon-banner.png)

# autocannon-compare

Compare two autocannon runs, using
[ttest](https://github.com/AndreasMadsen/ttest).

## Install

Locally, for [API](#api) usage

```
npm i autocannon-compare --save
```

Globally, for [CLI](#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.

```js
{
  "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

```js
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](http://nearform.com).

## License

Copyright [Matteo Collina](https://github.com/mcollina), Licensed under [MIT](./LICENSE).

---
_Source: https://npm.io/package/autocannon-compare · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
