GithubHelp home page GithubHelp logo

api-benchmarks's Introduction

api-benchmarks

Idea borrowed from: https://medium.com/@tschundeee/express-vs-flask-vs-go-acc0879c2122#.61v429cr3 Assumes OS X with Homebrew

SETUP

Benchmark tool (wrk)

git clone https://github.com/wg/wrk
cd wrk; make; cp wrk; /usr/local/bin/; cd ..;

Python

pip install meinheld gunicorn falcon

GO

go get github.com/gorilla/pat
go build serve.go```

#NodeJS w/pm2 for lazy concurrency

```npm install
npm install -g pm2```


## Haskell

Install [Haskell stack](https://docs.haskellstack.org/en/stable/README/) in your `$PATH`.

cd haskell-servant stack build






### RUN BENCHMARKS

Test Go

./serve

Bench it (in other tab)

wrk -c 64 -d 30s http://localhost:4000/10

Test Falcon with 4 threads per core

gunicorn -w16 falconer:app -k meinheld.gmeinheld.MeinheldWorker

Bench it (in other tab)

wrk -c 64 -d 30s http://localhost:8000/10

Test NodeJS (express)

pm2 start express.js -i 16

Bench it (in other tab)

wrk -c 64 -d 30s http://localhost:3000/10

Test NodeJS (restify)

pm2 start express.js -i 16

Bench it (in other tab)

wrk -c 64 -d 30s http://localhost:3000/10


cd haskell-servant && stack exec haskell-servant-exe

Bench it (in other tab)

wrk -c 64 -d 30s http://localhost:8080/10

api-benchmarks's People

Contributors

bo01ean avatar

Watchers

 avatar

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.