GithubHelp home page GithubHelp logo

autocannon-compare's People

Contributors

donutespresso avatar mcollina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autocannon-compare's Issues

Order of magnitude in comparisons

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.