Skip to content

Instantly share code, notes, and snippets.

@devdatta
Forked from headius/gist:380205
Created April 27, 2010 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdatta/380363 to your computer and use it in GitHub Desktop.
Save devdatta/380363 to your computer and use it in GitHub Desktop.
~/projects/jruby ➔ cat blah.rb
# hello_world.rb
require 'rubygems'
require 'sinatra'
get '/' do
sleep 2
"Hello world, it's #{Time.now} at the server!"
end
~/projects/jruby ➔ cat config.ru
require 'rubygems'
require 'sinatra'
require 'blah'
set :environment, :production
set :app_file, File.join('.', 'blah.rb')
disable :run
run Sinatra::Application
~/projects/jruby ➔ trinidad -r config.ru > /dev/null
...
~/projects/jruby-rack ➔ ab -c 100 -n 1000 http://localhost:3000/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 3000
Document Path: /
Document Length: 63 bytes
Concurrency Level: 100
Time taken for tests: 20.432 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 210000 bytes
HTML transferred: 63000 bytes
Requests per second: 48.94 [#/sec] (mean)
Time per request: 2043.168 [ms] (mean)
Time per request: 20.432 [ms] (mean, across all concurrent requests)
Transfer rate: 10.04 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 4 8.1 0 43
Processing: 2002 2023 29.5 2008 2148
Waiting: 1994 2021 28.2 2007 2148
Total: 2002 2027 33.3 2009 2149
Percentage of the requests served within a certain time (ms)
50% 2009
66% 2025
75% 2035
80% 2044
90% 2080
95% 2113
98% 2131
99% 2132
100% 2149 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment