Git Product home page Git Product logo

benchmark's Introduction

benchmark

build status

egg benchmark

Commands

  • npm test to run all the benchmarks and store the results in stats.csv (requires wrk), also you can open plot/index.html to see the results
  • ./plot.sh to compare performance between the latest releases of Node.js v7.x, v8.x, rc, nightly and v8-canary (requires wrk and nvm), then open plot/index.html to see the results
    • Requires AJAX privilege to load data from plot/all.csv, you can run python -m SimpleHTTPServer then visit http://localhost:8000/plot/ (or use any other static server) if you don't want to tweak browser settings

Default Middleware

  • egg default enable 15 middlewares (6 security middlewares enable by default)
  • enable router
  • passport has 17 middlewares (15 default, 2 passport middlewares)
  • csrf are disabled, because in most situation we won't caculate csrf token and set to cookie

Scenes

  • Hello World: $ EGG_SERVER_ENV=prod node benchmarks/simple/dispatch.js
  • nunjucks: $ EGG_SERVER_ENV=prod node benchmarks/simple_view/dispatch.js
  • Empty passport: $ EGG_SERVER_ENV=prod node benchmarks/simple_passport/dispatch.js

Scripts

  • koa1: wrk http://127.0.0.1:7001/ -d 10 -c 50 -t 8
  • koa2: wrk http://127.0.0.1:7002/ -d 10 -c 50 -t 8
  • egg1: wrk http://127.0.0.1:7003/ -d 10 -c 50 -t 8
  • egg2: wrk http://127.0.0.1:7004/ -d 10 -c 50 -t 8

Server

  • MacBook Pro (Retina, 15-inch, Late 2013)
  • 2 GHz Intel Core i7 (only use 4 core for benchmark)

CPU Profiler

image

Known issues

  • Date.now() cost a lot of CPU time(7%) in meta middleware and CreateContext method.

Last Results

benchmark's People

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.