Sha256: 667e411394a7aea01b1f19fda983ce8d9bce6cc84298f6b065e42fb75d92bac5

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

# Frankie vs Sinatra performance test

Note: all the tests below were made using Thin as a webserver. Httperf was
choosen as the tool to do that. Bench settings: `--num-conns 10000`

Hardware: Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz, 6 GB DDR3

## Results

| Benchmark | Frankie (req/s) | Sinatra (req/s) |
|-----------|:---------------:|:---------------:|
| Simple    |__5012__         |2534             |
| UrlPattern|__4564__         |2338             |
| Filters   |__4510__         |2465             |
| Helpers   |__4737__         |2663             |

See below the code for each benchmark

## Code
### Simple

    class App < Frankie::App #(or Sinatra::Base)
      get '/' do
        'Hello World!'
      end
    end
    
### UrlPattern
    class App < Frankie::App #(or Sinatra::Base)
      get '/hello/:name' do
        "Hello #{params[:name]}!"
      end
    end

### Filters
    class App < Frankie::App #(or Sinatra::Base)
      before do
        request
      end
    
      after do
        response
      end
    
      get '/' do
        'Hello World!'
      end
    end
    
### Helpers
    module Dude
      def da_request_man
        request
      end
    end
    
    class App < Frankie::App #(or Sinatra::Base)
      helpers Dude
    
      get '/' do
        da_request_man
        'Hello World!'
      end
    end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
nyny-1.0.0.pre1 Performance.md
little_frankie-1.0.0.pre1 Performance.md