Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcollina/autocannon-compare
Compare two autocannon runs
https://github.com/mcollina/autocannon-compare
Last synced: about 1 month ago
JSON representation
Compare two autocannon runs
- Host: GitHub
- URL: https://github.com/mcollina/autocannon-compare
- Owner: mcollina
- License: mit
- Created: 2017-02-16T09:02:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-15T20:38:42.000Z (almost 6 years ago)
- Last Synced: 2024-11-01T12:42:21.646Z (about 2 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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).