mcollina / autocannon-compare Goto Github PK
View Code? Open in Web Editor NEWCompare two autocannon runs
License: MIT License
Compare two autocannon runs
License: MIT License
In the response from autocannon-compare, we have a valid
property and it is not documented
https://github.com/mcollina/autocannon-compare/blob/master/compare.js#L39
Hey! I'm using autocannon-compare
to avoid regression and I got the following behavior
const compare = require('autocannon-compare')
const a = {
"url": "http://localhost:3000/slow",
"connections": 10,
"pipelining": 1,
"duration": 10.03,
"start": "2021-04-06T03:12:06.473Z",
"finish": "2021-04-06T03:12:16.502Z",
"errors": 0,
"timeouts": 0,
"mismatches": 0,
"non2xx": 0,
"resets": 0,
"1xx": 0,
"2xx": 40,
"3xx": 0,
"4xx": 0,
"5xx": 0,
"latency": {
"average": 2010.65,
"mean": 2010.65,
"stddev": 8.6,
"min": 2005,
"max": 2026,
"p0_001": 2005,
"p0_01": 2005,
"p0_1": 2005,
"p1": 2005,
"p2_5": 2005,
"p10": 2005,
"p25": 2005,
"p50": 2006,
"p75": 2007,
"p90": 2026,
"p97_5": 2026,
"p99": 2026,
"p99_9": 2026,
"p99_99": 2026,
"p99_999": 2026,
"totalCount": 40
},
"requests": {
"average": 4,
"mean": 4,
"stddev": 4.9,
"min": 10,
"max": 10,
"total": 40,
"p0_001": 0,
"p0_01": 0,
"p0_1": 0,
"p1": 0,
"p2_5": 0,
"p10": 0,
"p25": 0,
"p50": 0,
"p75": 10,
"p90": 10,
"p97_5": 10,
"p99": 10,
"p99_9": 10,
"p99_99": 10,
"p99_999": 10,
"sent": 50
},
"throughput": {
"average": 724,
"mean": 724,
"stddev": 886.72,
"min": 1810,
"max": 1810,
"total": 7240,
"p0_001": 0,
"p0_01": 0,
"p0_1": 0,
"p1": 0,
"p2_5": 0,
"p10": 0,
"p25": 0,
"p50": 0,
"p75": 1810,
"p90": 1810,
"p97_5": 1810,
"p99": 1810,
"p99_9": 1810,
"p99_99": 1810,
"p99_999": 1810
}
}
const b = {
title: undefined,
url: 'http://localhost:3000/slow',
socketPath: undefined,
connections: 10,
pipelining: 1,
workers: undefined,
duration: 10.04,
start: '2021-04-07T02:06:20.937Z',
finish: '2021-04-07T02:06:30.974Z',
errors: 0,
timeouts: 0,
mismatches: 0,
non2xx: 0,
resets: 0,
'1xx': 0,
'2xx': 20,
'3xx': 0,
'4xx': 0,
'5xx': 0,
latency: {
average: 4012.1,
mean: 4012.1,
stddev: 8.38,
min: 4003,
max: 4022,
p0_001: 4003,
p0_01: 4003,
p0_1: 4003,
p1: 4003,
p2_5: 4003,
p10: 4003,
p25: 4004,
p50: 4005,
p75: 4019,
p90: 4022,
p97_5: 4022,
p99: 4022,
p99_9: 4022,
p99_99: 4022,
p99_999: 4022,
totalCount: 20
},
requests: {
average: 2,
mean: 2,
stddev: 4,
min: 10,
max: 10,
total: 20,
p0_001: 0,
p0_01: 0,
p0_1: 0,
p1: 0,
p2_5: 0,
p10: 0,
p25: 0,
p50: 0,
p75: 0,
p90: 10,
p97_5: 10,
p99: 10,
p99_9: 10,
p99_99: 10,
p99_999: 10,
sent: 30
},
throughput: {
average: 362,
mean: 362,
stddev: 724,
min: 1810,
max: 1810,
total: 3620,
p0_001: 0,
p0_01: 0,
p0_1: 0,
p1: 0,
p2_5: 0,
p10: 0,
p25: 0,
p50: 0,
p75: 0,
p90: 1810,
p97_5: 1810,
p99: 1810,
p99_9: 1810,
p99_99: 1810,
p99_999: 1810
}
}
console.log(compare(a, b))
// {
// requests: {
// valid: false,
// difference: '100%',
// pValue: 0.09781206060524837,
// significant: ''
// },
// throughput: {
// valid: true,
// difference: '100%',
// pValue: 0.3302433697393767,
// significant: ''
// },
// latency: {
// valid: false,
// difference: '-49.89%',
// pValue: 3.7788980022761843e-85,
// significant: '***'
// },
// aWins: false,
// bWins: false,
// equal: true
// }
And I'm wondering if this is expected since the b
benchmark is twice worst than a
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.