public
Last active

simple testing sinatra application

  • Download Gist
rbx-1.2.1dev.run-1.webrick.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
BENCH http://localhost:9294/h
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 1945 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 0.01 MB
Response time: 0.14 secs
Transaction rate: 97.30 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 13.79
Successful transactions: 1945
Failed transactions: 0
Longest transaction: 9.71
Shortest transaction: 0.00
BENCH http://localhost:9294/hh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 2322 hits
Availability: 100.00 %
Elapsed time: 19.97 secs
Data transferred: 0.12 MB
Response time: 0.12 secs
Transaction rate: 116.27 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 13.80
Successful transactions: 2322
Failed transactions: 0
Longest transaction: 13.23
Shortest transaction: 0.00
BENCH http://localhost:9294/n
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 2342 hits
Availability: 99.96 %
Elapsed time: 19.98 secs
Data transferred: 8.70 MB
Response time: 0.12 secs
Transaction rate: 117.22 trans/sec
Throughput: 0.44 MB/sec
Concurrency: 14.39
Successful transactions: 2342
Failed transactions: 1
Longest transaction: 10.70
Shortest transaction: 0.00
BENCH http://localhost:9294/nh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 1331 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 10.06 MB
Response time: 0.19 secs
Transaction rate: 66.58 trans/sec
Throughput: 0.50 MB/sec
Concurrency: 12.73
Successful transactions: 1331
Failed transactions: 0
Longest transaction: 10.66
Shortest transaction: 0.03
BENCH http://localhost:9294/s
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 326 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.41 MB
Response time: 0.83 secs
Transaction rate: 16.32 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 13.51
Successful transactions: 326
Failed transactions: 0
Longest transaction: 13.18
Shortest transaction: 0.07
BENCH http://localhost:9294/sh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 277 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 0.39 MB
Response time: 0.96 secs
Transaction rate: 13.86 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 13.30
Successful transactions: 277
Failed transactions: 0
Longest transaction: 9.66
Shortest transaction: 0.05
BENCH http://localhost:9294/m
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 274 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 0.34 MB
Response time: 0.96 secs
Transaction rate: 13.71 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 13.19
Successful transactions: 274
Failed transactions: 0
Longest transaction: 13.92
Shortest transaction: 0.12
BENCH http://localhost:9294/mh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 279 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.40 MB
Response time: 1.02 secs
Transaction rate: 13.96 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 14.29
Successful transactions: 279
Failed transactions: 0
Longest transaction: 9.76
Shortest transaction: 0.08
rbx-1.2.1dev.run-2.webrick.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
BENCH http://localhost:9294/h
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege.. done.
Transactions: 2880 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 0.01 MB
Response time: 0.10 secs
Transaction rate: 144.07 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 13.81
Successful transactions: 2880
Failed transactions: 0
Longest transaction: 9.05
Shortest transaction: 0.01
BENCH http://localhost:9294/hh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 2953 hits
Availability: 100.00 %
Elapsed time: 19.96 secs
Data transferred: 0.15 MB
Response time: 0.09 secs
Transaction rate: 147.95 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 14.01
Successful transactions: 2953
Failed transactions: 0
Longest transaction: 17.64
Shortest transaction: 0.01
BENCH http://localhost:9294/n
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 2620 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 9.73 MB
Response time: 0.11 secs
Transaction rate: 131.13 trans/sec
Throughput: 0.49 MB/sec
Concurrency: 14.04
Successful transactions: 2620
Failed transactions: 0
Longest transaction: 13.53
Shortest transaction: 0.01
BENCH http://localhost:9294/nh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 1335 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 10.09 MB
Response time: 0.21 secs
Transaction rate: 66.78 trans/sec
Throughput: 0.50 MB/sec
Concurrency: 13.92
Successful transactions: 1335
Failed transactions: 0
Longest transaction: 12.04
Shortest transaction: 0.02
BENCH http://localhost:9294/s
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 326 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.41 MB
Response time: 0.85 secs
Transaction rate: 16.32 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 13.89
Successful transactions: 326
Failed transactions: 0
Longest transaction: 11.75
Shortest transaction: 0.06
BENCH http://localhost:9294/sh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 284 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 0.40 MB
Response time: 0.99 secs
Transaction rate: 14.21 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 14.13
Successful transactions: 284
Failed transactions: 0
Longest transaction: 12.89
Shortest transaction: 0.05
BENCH http://localhost:9294/m
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 315 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.39 MB
Response time: 0.78 secs
Transaction rate: 15.77 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 12.36
Successful transactions: 315
Failed transactions: 0
Longest transaction: 11.54
Shortest transaction: 0.00
BENCH http://localhost:9294/mh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 241 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.34 MB
Response time: 1.14 secs
Transaction rate: 12.06 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 13.81
Successful transactions: 241
Failed transactions: 0
Longest transaction: 10.01
Shortest transaction: 0.26
ree-2010.02.webrick.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
BENCH http://localhost:9292/h
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 5097 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.02 MB
Response time: 0.06 secs
Transaction rate: 255.11 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 14.75
Successful transactions: 5097
Failed transactions: 0
Longest transaction: 4.97
Shortest transaction: 0.00
BENCH http://localhost:9292/hh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 4462 hits
Availability: 100.00 %
Elapsed time: 19.97 secs
Data transferred: 0.23 MB
Response time: 0.06 secs
Transaction rate: 223.44 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 14.04
Successful transactions: 4462
Failed transactions: 0
Longest transaction: 4.16
Shortest transaction: 0.01
BENCH http://localhost:9292/n
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 2824 hits
Availability: 100.00 %
Elapsed time: 19.97 secs
Data transferred: 10.48 MB
Response time: 0.10 secs
Transaction rate: 141.41 trans/sec
Throughput: 0.53 MB/sec
Concurrency: 14.83
Successful transactions: 2824
Failed transactions: 0
Longest transaction: 7.49
Shortest transaction: 0.03
BENCH http://localhost:9292/nh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 1659 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 12.54 MB
Response time: 0.18 secs
Transaction rate: 83.03 trans/sec
Throughput: 0.63 MB/sec
Concurrency: 14.82
Successful transactions: 1659
Failed transactions: 0
Longest transaction: 9.80
Shortest transaction: 0.03
BENCH http://localhost:9292/s
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 481 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.60 MB
Response time: 0.60 secs
Transaction rate: 24.07 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.54
Successful transactions: 481
Failed transactions: 0
Longest transaction: 9.61
Shortest transaction: 0.03
BENCH http://localhost:9292/sh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 449 hits
Availability: 100.00 %
Elapsed time: 19.97 secs
Data transferred: 0.64 MB
Response time: 0.65 secs
Transaction rate: 22.48 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.69
Successful transactions: 449
Failed transactions: 0
Longest transaction: 11.72
Shortest transaction: 0.03
BENCH http://localhost:9292/m
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 468 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 0.59 MB
Response time: 0.62 secs
Transaction rate: 23.41 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.61
Successful transactions: 468
Failed transactions: 0
Longest transaction: 9.87
Shortest transaction: 0.03
BENCH http://localhost:9292/mh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege.. done.
Transactions: 450 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.64 MB
Response time: 0.65 secs
Transaction rate: 22.52 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.53
Successful transactions: 450
Failed transactions: 0
Longest transaction: 11.18
Shortest transaction: 0.03
ruby-1.9.2.webrick.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
BENCH http://localhost:9293/h
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 4211 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.02 MB
Response time: 0.07 secs
Transaction rate: 210.76 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 14.78
Successful transactions: 4211
Failed transactions: 0
Longest transaction: 3.72
Shortest transaction: 0.00
BENCH http://localhost:9293/hh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 3600 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.18 MB
Response time: 0.08 secs
Transaction rate: 180.18 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 14.82
Successful transactions: 3600
Failed transactions: 0
Longest transaction: 3.12
Shortest transaction: 0.01
BENCH http://localhost:9293/n
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 2366 hits
Availability: 100.00 %
Elapsed time: 19.97 secs
Data transferred: 8.78 MB
Response time: 0.13 secs
Transaction rate: 118.48 trans/sec
Throughput: 0.44 MB/sec
Concurrency: 14.95
Successful transactions: 2366
Failed transactions: 0
Longest transaction: 0.36
Shortest transaction: 0.01
BENCH http://localhost:9293/nh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 1532 hits
Availability: 100.00 %
Elapsed time: 19.99 secs
Data transferred: 11.58 MB
Response time: 0.19 secs
Transaction rate: 76.64 trans/sec
Throughput: 0.58 MB/sec
Concurrency: 14.91
Successful transactions: 1532
Failed transactions: 0
Longest transaction: 3.47
Shortest transaction: 0.02
BENCH http://localhost:9293/s
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 427 hits
Availability: 100.00 %
Elapsed time: 19.97 secs
Data transferred: 0.53 MB
Response time: 0.68 secs
Transaction rate: 21.38 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.63
Successful transactions: 427
Failed transactions: 0
Longest transaction: 4.68
Shortest transaction: 0.10
BENCH http://localhost:9293/sh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 395 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.56 MB
Response time: 0.74 secs
Transaction rate: 19.77 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.69
Successful transactions: 395
Failed transactions: 0
Longest transaction: 11.15
Shortest transaction: 0.10
BENCH http://localhost:9293/m
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 417 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.52 MB
Response time: 0.70 secs
Transaction rate: 20.87 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.57
Successful transactions: 417
Failed transactions: 0
Longest transaction: 8.51
Shortest transaction: 0.09
BENCH http://localhost:9293/mh
** SIEGE 2.69
** Preparing 15 concurrent users for battle.
The server is now under siege...
 
Lifting the server siege... done.
Transactions: 394 hits
Availability: 100.00 %
Elapsed time: 19.98 secs
Data transferred: 0.56 MB
Response time: 0.74 secs
Transaction rate: 19.72 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 14.60
Successful transactions: 394
Failed transactions: 0
Longest transaction: 8.77
Shortest transaction: 0.03
sin.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
require 'rubygems'
require 'sinatra'
require 'sequel'
require 'haml'
 
con = Sequel.connect('postgres://dmw:dmw@localhost:5433/domowoi_development')
enable :inline_template
 
get '/h' do
'hello'
end
 
get '/hh' do
haml :index
end
 
get '/n' do
s = ''
for i in 1..1000
s << "#{i}" << "\n"
end
s
end
 
get '/nh' do
haml :numbers
end
 
# users has about 40 rows in a table
get '/s' do
'<pre>'+
con[:users].all.map do |u|
"#{u[:id]}\t#{u[:login]}\t#{u[:first_name]}\t#{u[:ser_name]}"
end.join("\n") +
'</pre>'
end
 
get '/sh' do
@users = con[:users].all
haml :sequel
end
 
class User < Sequel::Model
end
 
get '/m' do
'<pre>'+
User.all.map do |u|
[u.id, u.login, u.first_name, u.ser_name].join("\t")
end.join("\n") +
'</pre>'
end
 
get '/mh' do
@users = User.all
haml :model
end
 
before do
content_type 'text/html', :charset => 'utf-8'
end
 
__END__
@@ layout
%html
%body
= yield
 
@@ index
%h1 Hello
 
@@ numbers
- for i in 1..1000
= i
 
@@ sequel
%pre
- @users.each do |u|
= "#{u[:id]}\t#{u[:login]}\t#{u[:first_name]}\t#{u[:ser_name]}"
 
@@ model
%pre
- @users.each do |u|
= [u.id, u.login, u.first_name, u.ser_name].join("\t")
sin.ru
Ruby
1 2 3
require './sin.rb'
 
run Sinatra::Application
test.sh
Shell
1 2 3 4 5 6 7 8 9 10 11
PORT=$1
PAGES="h hh n nh s sh m mh"
for p in $PAGES ; do
curl http://localhost:$PORT/$p > /dev/null 2>&1
siege -b -t 10S http://localhost:$PORT/$p > /dev/null 2>&1
done
 
for p in $PAGES ; do
echo "BENCH http://localhost:$PORT/$p"
siege -b -t 20S http://localhost:$PORT/$p > /dev/null
done

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.