Skip to content

Instantly share code, notes, and snippets.

@shadoi
Created April 3, 2014 01:27
Show Gist options
  • Save shadoi/9946713 to your computer and use it in GitHub Desktop.
Save shadoi/9946713 to your computer and use it in GitHub Desktop.
Reel 0.4.0 concurrency test
require 'rack'
require 'sinatra/base'
require 'json'
require 'reel/rack'
class ConcTest < Sinatra::Base
configure do
enable :logging
set :logging, :debug
set :environment, :production
set :dump_errors, true
set :show_exceptions, true
end
get '/' do
sleep 3
end
end
Rack::Server.start(app: ConcTest, server: :reel, host: '127.0.0.1', port: 12345)
Testing with httperf results:
httperf --port 12345 --num-conns=20 --num-calls=100
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
Maximum connect burst length: 1
Total: connections 20 requests 2 replies 0 test-duration 10.016 s
Connection rate: 2.0 conn/s (500.8 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 0.0 avg 0.0 max 0.0 median 0.0 stddev 0.0
Connection time [ms]: connect 0.0
Connection length [replies/conn]: 0.000
Request rate: 0.2 req/s (5007.8 ms/req)
Request size [B]: 62.0
Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (2 samples)
Reply time [ms]: response 0.0 transfer 0.0
Reply size [B]: header 0.0 content 0.0 footer 0.0 (total 0.0)
Reply status: 1xx=0 2xx=0 3xx=0 4xx=0 5xx=0
CPU time [s]: user 1.97 system 8.02 (user 19.7% system 80.1% total 99.8%)
Net I/O: 0.0 KB/s (0.0*10^6 bps)
Errors: total 20 client-timo 0 socket-timo 0 connrefused 18 connreset 2
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment