Comparative ruby web application benchmarks with a large number of routes
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.rdoc

r10k

r10k provides comparative benchmarks for many ruby web application frameworks with 10, 100, 1000, and 10,000 routes. Here are the currently supported frameworks:

cuba

Cuba (cuba.is)

hanami

Hanami (hanamirb.org/)

nyny

NYNY (github.com/alisnic/nyny)

rack-app

Rack::App (github.com/rack-app/rack-app)

rails

Ruby on Rails (rubyonrails.org/)

roda

Roda (roda.jeremyevans.net)

sinatra

Sinatra (www.sinatrarb.com/)

syro

Syro (soveran.github.io/syro/)

synfeld

Synfeld (github.com/swerling/synfeld)

These frameworks are designed to be run with the default settings. There are some variants that can be run with non-default settings:

static-route

A basic static routing implementation, for maximum performance

rails-minimal-middleware

Rails, with most middleware removed

roda-multi-route

Roda, using the multi_route plugin

roda-osm

Roda, using optimized_string_matchers plugin

roda-run

Roda, using separate Roda applications per branch

roda-static-routing

Roda, using the static_routing plugin

sinatra-minimal-middleware

Sinatra, using the minimum middleware

Usage

To use:

rake bench graphs

Note that rake bench can take quite a long time, especially on slower hardware.

If you only want to benchmark specific apps, set the R10K_APPS environment variable:

rake bench graphs R10K_APPS="roda cuba"

The builders directory contains the files that build the applications. If you want to examine the application files used for benchmarking, you can use the build task and then look in the apps directory. The bench task produces CSV files which are stored in the data directory. The graphs task takes those CSV files and turns them into nice looking graphs (using gruff).

Environment variables:

DIM

Dimensions for the graphs (default: 1280x720)

LEVELS

The number of levels for the routes (default: 4)

LEGEND_FONT_SIZE

Override base font size for legend text in graphs

R10K_APPS

Which applications/configurations to benchmark

R10_ITERATIONS

The number of iterations to run (default: 2)

R10K_WARMUP_ITERATIONS

The number of warmup iterations to run (default: 0)

ROUTES_PER_LEVEL

The number of routes in each level (default: 10)

Total number of routes in largest application is ROUTES_PER_LEVEL**LEVELS.

License

MIT

Author

Jeremy Evans <code@jeremyevans.net>