Created
March 24, 2012 07:40
-
-
Save happy15/2179728 to your computer and use it in GitHub Desktop.
wired benchmark: cuba vs sinatra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simple.rb | |
========= | |
require 'sinatra' | |
use Rack::CommonLogger | |
get '/' do | |
'hello' | |
end | |
not_found do | |
redirect '/' | |
end | |
================================= | |
ab -n 1000 -c 200 http://lh:4567/ | |
================================= | |
Server Software: thin | |
Server Hostname: lh | |
Server Port: 4567 | |
Document Path: / | |
Document Length: 5 bytes | |
Concurrency Level: 200 | |
Time taken for tests: 0.884 seconds | |
Complete requests: 1000 | |
Failed requests: 0 | |
Write errors: 0 | |
Total transferred: 208000 bytes | |
HTML transferred: 5000 bytes | |
Requests per second: 1131.85 [#/sec] (mean) | |
Time per request: 176.703 [ms] (mean) | |
Time per request: 0.884 [ms] (mean, across all concurrent requests) | |
Transfer rate: 229.91 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 3 3.4 1 11 | |
Processing: 42 112 38.8 113 706 | |
Waiting: 27 108 39.0 111 706 | |
Total: 48 115 39.5 114 715 | |
Percentage of the requests served within a certain time (ms) | |
50% 114 | |
66% 119 | |
75% 127 | |
80% 135 | |
90% 161 | |
95% 166 | |
98% 167 | |
99% 167 | |
100% 715 (longest request) | |
============================== | |
Rack::CommonLogger info (part) | |
============================== | |
...... | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0040 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0038 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0037 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0035 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0042 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0043 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0040 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0038 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0036 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0034 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0032 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0031 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0029 | |
127.0.0.1 - - [24/Mar/2012 15:24:42] "GET / HTTP/1.0" 200 5 0.0026 | |
...... | |
simple.ru | |
============================== | |
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'cuba' | |
Cuba.define do | |
res["Content-Type"] = "text/html; charset=utf-8" | |
on root do | |
res.write 'hello' | |
end | |
on default do | |
res.redirect '/' | |
end | |
end | |
run Cuba | |
================================= | |
ab -n 1000 -c 200 http://lh:9292/ | |
================================= | |
Server Software: thin | |
Server Hostname: lh | |
Server Port: 9292 | |
Document Path: / | |
Document Length: 5 bytes | |
Concurrency Level: 200 | |
Time taken for tests: 1.272 seconds | |
Complete requests: 1000 | |
Failed requests: 0 | |
Write errors: 0 | |
Total transferred: 147000 bytes | |
HTML transferred: 5000 bytes | |
Requests per second: 786.45 [#/sec] (mean) | |
Time per request: 254.309 [ms] (mean) | |
Time per request: 1.272 [ms] (mean, across all concurrent requests) | |
Transfer rate: 112.90 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 3 5.0 0 15 | |
Processing: 49 168 54.8 155 898 | |
Waiting: 14 147 54.0 141 883 | |
Total: 50 171 58.2 155 900 | |
Percentage of the requests served within a certain time (ms) | |
50% 155 | |
66% 162 | |
75% 169 | |
80% 185 | |
90% 260 | |
95% 262 | |
98% 262 | |
99% 262 | |
100% 900 (longest request) | |
============================== | |
Rack::CommonLogger info (part) | |
============================== | |
...... | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0006 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0008 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0008 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0006 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0008 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0008 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0008 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0057 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0009 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0008 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0007 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0010 | |
127.0.0.1 - - [24/Mar/2012 15:26:47] "GET / HTTP/1.0" 200 5 0.0009 | |
...... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@soveran can you take a look at this? @happy15