Git Product home page Git Product logo

benchmarks's Introduction

Build Status Coverage Status js-standard-style NPM version NPM downloads Gitter


TL;DR

  • Fastify is, fast and low overhead web framework for Node.js
  • This package shows how fast it is comparatively.

Installing

npm i -g fastify-benchmarks

Usage

benchmark [arguments (optional)]

Arguments

  • -h: Help on how to use the tool.
  • compare: Get comparative data for your benchmarks.

You may also compare all test results, at once, in a single table; benchmark compare -t

You can also extend the comparsion table with percentage values based on fastest result; benchmark compare -p

Benchmarks

  • Machine: MacBook Pro (Late 2013 | 2.3 GHz Intel Core i7 | 16 GB 1600 MHz DDR3)
  • Method: autocannon -c 100 -d 5 -p 10 localhost:3000 (two rounds; one warm-up, one to measure).
  • Node: 8.11.2
┌──────────────────────────┬─────────┬────────┬────────────┬─────────┬───────────────┐
│                          │ Version │ Router │ Requests/s │ Latency │ Throughput/Mb │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ bare                     │ 8.11.2  │ ✗      │ 30156.8    │ 3.23    │ 4.36          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ connect-router           │ 1.3.2   │ ✓      │ 32603.8    │ 2.98    │ 4.62          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ connect                  │ 3.6.6   │ ✗      │ 38119.2    │ 2.54    │ 5.37          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ express-route-prefix     │ 4.16.2  │ ✓      │ 18524.95   │ 5.45    │ 6.46          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ express-with-middlewares │ 4.16.2  │ ✓      │ 14403.4    │ 6.83    │ 5.21          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ express                  │ 4.16.2  │ ✓      │ 22365.2    │ 4.38    │ 3.50          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ fastify-big-json         │ 1.5.0   │ ✓      │ 5273.8     │ 18.83   │ 60.60         │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ fastify                  │ 1.5.0   │ ✓      │ 35912      │ 2.7     │ 5.62          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ hapi                     │ 17.5.0  │ ✓      │ 21769.2    │ 4.53    │ 3.42          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ koa-router               │ 7.4.0   │ ✓      │ 23903.6    │ 4.1     │ 3.74          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ koa                      │ 2.5.0   │ ✗      │ 24987.2    │ 3.92    │ 3.89          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ micro                    │ 9.1.0   │ ✗      │ 35254.4    │ 2.75    │ 5.54          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ microrouter              │ 3.1.1   │ ✓      │ 19473.6    │ 5.04    │ 3.03          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ polka                    │ 0.4.0   │ ✓      │ 36824      │ 2.63    │ 5.23          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ rayo                     │ 1.0.0   │ ✓      │ 35299.2    │ 2.74    │ 5.06          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ restify                  │ 7.1.0   │ ✓      │ 20796      │ 4.38    │ 3.30          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ spirit-router            │ 0.5.0   │ ✓      │ 27592.4    │ 3.2     │ 4.34          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ spirit                   │ 0.6.1   │ ✗      │ 36883.2    │ 2.39    │ 5.78          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ take-five                │ 1.3.5   │ ✓      │ 29164.8    │ 3.04    │ 9.74          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ total.js                 │ 2.9.30  │ ✓      │ 22850.8    │ 4.29    │ 6.51          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ trek-engine              │ 1.0.5   │ ✗      │ 31837.2    │ 3.06    │ 4.58          │
├──────────────────────────┼─────────┼────────┼────────────┼─────────┼───────────────┤
│ trek-router              │ 1.2.0   │ ✓      │ 28472.8    │ 3.43    │ 4.11          │
└──────────────────────────┴─────────┴────────┴────────────┴─────────┴───────────────┘

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.