Skip to content

sdogruyol/which_is_the_fastest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Which is the fastest?

Result

How to run server

bin/server_rails # for rails
bin/server_kemal # for Kemal
bin/server_route_cr # for route.cr

How to run client

time bin/client -t 16 -r 1000 # 48000 requests in total
time bin/client -t 16 -r 2000 # 96000 requests in total
time bin/client -t 16 -r 3000 # 144000 requests in total
time bin/client -t 16 -r 4000 # 192000 requests in total
time bin/client -t 16 -r 5000 # 240000 requests in total

Regulation and Rule

  • Each server has no logics
  • There are only 3 routes
    • GET '/' return status code 200 with empty body
    • GET '/user/:id' return status code 200 with the id
    • POST '/user' return status code 200 with empty body

Installation

You need

  • crystal
  • rails

To compile servers,

> make

Usage

To run server

./bin/server_rails
./bin/server_kemal
./bin/server_route_cr

To run client

time ./bin/client

You can set # of threads and # of request loops(each loop requests 3 times) by

time ./bin/client -t 16 -r 1000

In the above example, 16 threads requests 1000 * 3 times. So 48000 requests are sent in total.

Thanks for

Development

  • Give me PR when you want to add other web frameworks
  • Give me PR when you can tuning each framework (under the regulation)

Contributing

  1. Fork it ( https://github.com/tbrand/which_is_the_fastest/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • tbrand Taichiro Suzuki - creator, maintainer

About

Which is the fastest web framework?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 71.3%
  • HTML 14.6%
  • Crystal 6.6%
  • JavaScript 3.4%
  • CSS 2.6%
  • Makefile 0.9%
  • CoffeeScript 0.6%