thin 0.6.4-x86-mswin32-60 → 0.7.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of thin might be problematic. Click here for more details.
- data/CHANGELOG +20 -0
- data/README +11 -12
- data/benchmark/abc +51 -0
- data/benchmark/benchmarker.rb +80 -0
- data/benchmark/runner +79 -0
- data/example/adapter.rb +3 -3
- data/example/thin.god +11 -7
- data/lib/thin.rb +17 -16
- data/lib/thin/command.rb +10 -4
- data/lib/thin/connection.rb +51 -9
- data/lib/thin/connectors/connector.rb +22 -10
- data/lib/thin/connectors/swiftiply_client.rb +55 -0
- data/lib/thin/connectors/unix_server.rb +5 -7
- data/lib/thin/controllers/cluster.rb +28 -22
- data/lib/thin/controllers/controller.rb +74 -14
- data/lib/thin/controllers/service.rb +1 -1
- data/lib/thin/daemonizing.rb +6 -4
- data/lib/thin/headers.rb +4 -0
- data/lib/thin/logging.rb +34 -9
- data/lib/thin/request.rb +31 -2
- data/lib/thin/response.rb +22 -7
- data/lib/thin/runner.rb +27 -14
- data/lib/thin/server.rb +55 -7
- data/lib/thin/version.rb +3 -3
- data/lib/thin_parser.so +0 -0
- data/spec/command_spec.rb +2 -3
- data/spec/connection_spec.rb +25 -1
- data/spec/connectors/swiftiply_client_spec.rb +66 -0
- data/spec/controllers/cluster_spec.rb +43 -12
- data/spec/controllers/controller_spec.rb +16 -4
- data/spec/controllers/service_spec.rb +0 -1
- data/spec/logging_spec.rb +42 -0
- data/spec/request/persistent_spec.rb +35 -0
- data/spec/response_spec.rb +18 -0
- data/spec/server/pipelining_spec.rb +108 -0
- data/spec/server/swiftiply.yml +6 -0
- data/spec/server/swiftiply_spec.rb +27 -0
- data/spec/server/tcp_spec.rb +3 -3
- data/spec/server_spec.rb +22 -0
- data/spec/spec_helper.rb +3 -3
- data/tasks/gem.rake +1 -1
- data/tasks/spec.rake +9 -0
- metadata +14 -6
- data/benchmark/previous.rb +0 -14
- data/benchmark/simple.rb +0 -15
- data/benchmark/utils.rb +0 -75
data/tasks/gem.rake
CHANGED
@@ -18,7 +18,7 @@ spec = Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'rack', '>= 0.2.0'
|
19
19
|
s.add_dependency 'eventmachine', '>= 0.8.1'
|
20
20
|
unless WIN
|
21
|
-
s.add_dependency
|
21
|
+
s.add_dependency 'daemons', '>= 1.0.9'
|
22
22
|
end
|
23
23
|
|
24
24
|
s.files = %w(COPYING CHANGELOG README Rakefile) +
|
data/tasks/spec.rake
CHANGED
@@ -11,6 +11,15 @@ else
|
|
11
11
|
desc "Run all examples"
|
12
12
|
Spec::Rake::SpecTask.new('spec') do |t|
|
13
13
|
t.spec_files = FileList['spec/**/*_spec.rb']
|
14
|
+
if WIN
|
15
|
+
t.spec_files -= [
|
16
|
+
'spec/connectors/unix_server_spec.rb',
|
17
|
+
'spec/controllers/service_spec.rb',
|
18
|
+
'spec/daemonizing_spec.rb',
|
19
|
+
'spec/server/unix_socket_spec.rb',
|
20
|
+
'spec/server/swiftiply_spec.rb'
|
21
|
+
]
|
22
|
+
end
|
14
23
|
end
|
15
24
|
|
16
25
|
task :check_spec_gems do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: x86-mswin32-60
|
6
6
|
authors:
|
7
7
|
- Marc-Andre Cournoyer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-02-
|
12
|
+
date: 2008-02-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -43,9 +43,9 @@ files:
|
|
43
43
|
- CHANGELOG
|
44
44
|
- README
|
45
45
|
- Rakefile
|
46
|
-
- benchmark/
|
47
|
-
- benchmark/
|
48
|
-
- benchmark/
|
46
|
+
- benchmark/abc
|
47
|
+
- benchmark/benchmarker.rb
|
48
|
+
- benchmark/runner
|
49
49
|
- bin/thin
|
50
50
|
- doc/benchmarks.txt
|
51
51
|
- example/adapter.rb
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- lib/thin/connection.rb
|
66
66
|
- lib/thin/connectors
|
67
67
|
- lib/thin/connectors/connector.rb
|
68
|
+
- lib/thin/connectors/swiftiply_client.rb
|
68
69
|
- lib/thin/connectors/tcp_server.rb
|
69
70
|
- lib/thin/connectors/unix_server.rb
|
70
71
|
- lib/thin/controllers
|
@@ -84,13 +85,13 @@ files:
|
|
84
85
|
- lib/thin/statuses.rb
|
85
86
|
- lib/thin/version.rb
|
86
87
|
- lib/thin.rb
|
87
|
-
- lib/thin_parser.so
|
88
88
|
- spec/command_spec.rb
|
89
89
|
- spec/configs
|
90
90
|
- spec/configs/cluster.yml
|
91
91
|
- spec/configs/single.yml
|
92
92
|
- spec/connection_spec.rb
|
93
93
|
- spec/connectors
|
94
|
+
- spec/connectors/swiftiply_client_spec.rb
|
94
95
|
- spec/connectors/tcp_server_spec.rb
|
95
96
|
- spec/connectors/unix_server_spec.rb
|
96
97
|
- spec/controllers
|
@@ -99,6 +100,7 @@ files:
|
|
99
100
|
- spec/controllers/service_spec.rb
|
100
101
|
- spec/daemonizing_spec.rb
|
101
102
|
- spec/headers_spec.rb
|
103
|
+
- spec/logging_spec.rb
|
102
104
|
- spec/rack_rails_spec.rb
|
103
105
|
- spec/rails_app
|
104
106
|
- spec/rails_app/app
|
@@ -159,14 +161,19 @@ files:
|
|
159
161
|
- spec/request/mongrel_spec.rb
|
160
162
|
- spec/request/parser_spec.rb
|
161
163
|
- spec/request/perf_spec.rb
|
164
|
+
- spec/request/persistent_spec.rb
|
162
165
|
- spec/request/processing_spec.rb
|
163
166
|
- spec/response_spec.rb
|
164
167
|
- spec/runner_spec.rb
|
165
168
|
- spec/server
|
166
169
|
- spec/server/builder_spec.rb
|
170
|
+
- spec/server/pipelining_spec.rb
|
167
171
|
- spec/server/stopping_spec.rb
|
172
|
+
- spec/server/swiftiply.yml
|
173
|
+
- spec/server/swiftiply_spec.rb
|
168
174
|
- spec/server/tcp_spec.rb
|
169
175
|
- spec/server/unix_socket_spec.rb
|
176
|
+
- spec/server_spec.rb
|
170
177
|
- spec/spec_helper.rb
|
171
178
|
- tasks/announce.rake
|
172
179
|
- tasks/deploy.rake
|
@@ -184,6 +191,7 @@ files:
|
|
184
191
|
- ext/thin_parser/extconf.rb
|
185
192
|
- ext/thin_parser/common.rl
|
186
193
|
- ext/thin_parser/parser.rl
|
194
|
+
- lib/thin_parser.so
|
187
195
|
has_rdoc: false
|
188
196
|
homepage: http://code.macournoyer.com/thin/
|
189
197
|
post_install_message:
|
data/benchmark/previous.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# Benchmark to compare Thin performance against
|
2
|
-
# previous Thin version (the one installed as a gem).
|
3
|
-
#
|
4
|
-
# Run with:
|
5
|
-
#
|
6
|
-
# ruby previous.rb [num of request]
|
7
|
-
#
|
8
|
-
require 'rubygems'
|
9
|
-
require 'rack'
|
10
|
-
require File.dirname(__FILE__) + '/utils'
|
11
|
-
|
12
|
-
request = (ARGV[0] || 1000).to_i # Number of request to send (ab -n option)
|
13
|
-
|
14
|
-
benchmark %w(current gem), request
|
data/benchmark/simple.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# Simple benchmark to compare Thin performance against
|
2
|
-
# other webservers supported by Rack.
|
3
|
-
#
|
4
|
-
# Run with:
|
5
|
-
#
|
6
|
-
# ruby simple.rb [num of request] [print|graph] [concurrency levels]
|
7
|
-
#
|
8
|
-
require File.dirname(__FILE__) + '/../lib/thin'
|
9
|
-
require File.dirname(__FILE__) + '/utils'
|
10
|
-
|
11
|
-
request = (ARGV[0] || 1000).to_i # Number of request to send (ab -n option)
|
12
|
-
output_type = (ARGV[1] || 'print')
|
13
|
-
levels = eval(ARGV[2] || '[1, 10, 100]').to_a
|
14
|
-
|
15
|
-
benchmark output_type, %w(WEBrick Mongrel EMongrel Thin), request, levels
|
data/benchmark/utils.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
require 'rack/lobster'
|
2
|
-
|
3
|
-
def run(handler_name, n=1000, c=1)
|
4
|
-
port = 7000
|
5
|
-
|
6
|
-
server = fork do
|
7
|
-
[STDOUT, STDERR].each { |o| o.reopen "/dev/null" }
|
8
|
-
|
9
|
-
case handler_name
|
10
|
-
when 'EMongrel'
|
11
|
-
require 'swiftcore/evented_mongrel'
|
12
|
-
handler_name = 'Mongrel'
|
13
|
-
|
14
|
-
when 'gem' # Load the current Thin gem
|
15
|
-
require 'thin'
|
16
|
-
handler_name = 'Thin'
|
17
|
-
|
18
|
-
when 'current' # Load the current Thin version under /lib
|
19
|
-
require File.dirname(__FILE__) + '/../lib/thin'
|
20
|
-
handler_name = 'Thin'
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
app = Rack::Lobster.new
|
25
|
-
|
26
|
-
handler = Rack::Handler.const_get(handler_name)
|
27
|
-
handler.run app, :Host => '0.0.0.0', :Port => port
|
28
|
-
end
|
29
|
-
|
30
|
-
sleep 2
|
31
|
-
|
32
|
-
out = `nice -n20 ab -c #{c} -n #{n} http://127.0.0.1:#{port}/ 2> /dev/null`
|
33
|
-
|
34
|
-
Process.kill('SIGKILL', server)
|
35
|
-
Process.wait
|
36
|
-
|
37
|
-
if requests = out.match(/^Requests.+?(\d+\.\d+)/)
|
38
|
-
requests[1].to_i
|
39
|
-
else
|
40
|
-
0
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def benchmark(type, servers, request, concurrency_levels)
|
45
|
-
send "#{type}_benchmark", servers, request, concurrency_levels
|
46
|
-
end
|
47
|
-
|
48
|
-
def graph_benchmark(servers, request, concurrency_levels)
|
49
|
-
require '/usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.9/lib/gruff'
|
50
|
-
g = Gruff::Area.new
|
51
|
-
g.title = "Server benchmark"
|
52
|
-
|
53
|
-
servers.each do |server|
|
54
|
-
g.data(server, concurrency_levels.collect { |c| print '.'; run(server, request, c) })
|
55
|
-
end
|
56
|
-
puts
|
57
|
-
|
58
|
-
g.x_axis_label = 'Concurrency'
|
59
|
-
g.y_axis_label = 'Requests / sec'
|
60
|
-
g.labels = {}
|
61
|
-
concurrency_levels.each_with_index { |c, i| g.labels[i] = c.to_s }
|
62
|
-
|
63
|
-
g.write('bench.png')
|
64
|
-
`open bench.png`
|
65
|
-
end
|
66
|
-
|
67
|
-
def print_benchmark(servers, request, concurrency_levels)
|
68
|
-
puts 'server request concurrency req/s'
|
69
|
-
puts '=' * 42
|
70
|
-
concurrency_levels.each do |c|
|
71
|
-
servers.each do |server|
|
72
|
-
puts "#{server.ljust(8)} #{request} #{c.to_s.ljust(4)} #{run(server, request, c)}"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|