public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Search Repo:
sync with main repo, tweak rakefile(s) again for better win32 gem, need to 
handle not forking in win32 from the executable script (daemons doesn't 
work on win32)
kevwil (author)
Wed Jan 16 23:15:01 -0800 2008
commit  6134e4395966cc3b7a4623aff635378a64f6e54c
tree    4a8d03e0b043648ceb06703ed4fcf06f87df01d2
parent  a4b49dc9ce34af6473bad89dac4be1aa8366dd46
...
8
9
10
11
12
...
8
9
10
 
 
0
@@ -8,6 +8,4 @@
0
 doc/rdoc/*
0
 tmp/*
0
 pkg/*
0
-Manifest
0
-nbproject/*
...
1
 
 
2
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
5
6
7
8
9
10
11
 
 
 
 
 
 
 
 
...
 
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
0
@@ -1,12 +1,39 @@
0
-v0.5.3. Purple Yogurt release
0
+== 0.5.3 Purple Yogurt release
0
+ * Add prefix option to thin script to mount app under a given path.
0
 
0
-v0.5.2. Cheezburger release
0
+== 0.5.2 Cheezburger release
0
+ * Add cluster support through the -s option in the thin script, start 3 thins like this:
0
+ thin start -s3 -p3000
0
+ 3 thin servers will be started on port 3000, 3001, 3002, also the port number will be
0
+ injected in the pid and log filenames.
0
+ * Fix IOError when writing to logger when starting server as a daemon.
0
+ * Really change directory when the -c option is specified.
0
+ * Add restart command to thin script.
0
+ * Fix typos in thin script usage message and expand chdir path.
0
+ * Rename thin script options to be the same as mongrel_rails script [thronedrk]:
0
+ -o --host => -a --address
0
+ --log-file => --log
0
+ --pid-file => --pid
0
+ --env => --environment
0
+
0
+== 0.5.1 LOLCAT release
0
+ * Add URL rewriting to Rails adapter so that page caching works and / fetches index.html if present.
0
+ * Fix bug in multiline response header parsing.
0
+ * Add specs for the Rails adapter.
0
+ * Fix Set-Cookie headers in Rails adapter to handle multiple values correctly.
0
+ * Fix Ruby 1.9 incompatibility in Response#headers= and Rakefile.
0
+ * Fix parser to be Ruby 1.9 compatible [Aman Gupta]
0
+ * Set gemspec to use EventMachine version 0.8.1 as it's the latest one having precompiled windows binaries.
0
+ [Francis Cianfrocca].
0
+ * Add -D option to thin script to set debugging on.
0
+ * Output incoming data and response when debugging is on.
0
 
0
-v0.5.1. LOLCAT release
0
-
0
-v0.5.0. full rewrite to use EventMachine, Rack, and Mongrel parser
0
-
0
-v0.4.1. Fix Rails environment option not being used in thin script.
0
-
0
-v0.4.0. First alphaish release as a gem.
0
+== 0.5.0
0
+ * Full rewrite to use EventMachine, Rack and Mongrel parser
0
+
0
+== 0.4.1
0
+ * Fix Rails environment option not being used in thin script.
0
+
0
+== 0.4.0
0
+ * First alphaish release as a gem.
...
 
 
 
...
1
2
3
0
@@ -1 +1,4 @@
0
+Marc-Andre Cournoyer <macournoyer@gmail.com>
0
+Kevin Williams <kevwil@gmail.com>
0
+James Golick
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -1 +1,19 @@
0
+Copyright (c) 2008 Marc-Andre Cournoyer
0
+
0
+Permission is hereby granted, free of charge, to any person obtaining a copy
0
+of this software and associated documentation files (the "Software"), to
0
+deal in the Software without restriction, including without limitation the
0
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
0
+sell copies of the Software, and to permit persons to whom the Software is
0
+furnished to do so, subject to the following conditions:
0
+
0
+The above copyright notice and this permission notice shall be included in
0
+all copies or substantial portions of the Software.
0
+
0
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0
+THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
0
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,19 +1 @@
0
-Copyright (c) 2008 Marc-Andre Cournoyer
0
-
0
-Permission is hereby granted, free of charge, to any person obtaining a copy
0
-of this software and associated documentation files (the "Software"), to
0
-deal in the Software without restriction, including without limitation the
0
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
0
-sell copies of the Software, and to permit persons to whom the Software is
0
-furnished to do so, subject to the following conditions:
0
-
0
-The above copyright notice and this permission notice shall be included in
0
-all copies or substantial portions of the Software.
0
-
0
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0
-THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
0
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
 
 
 
 
 
 
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
1
2
3
4
5
6
7
 
8
 
 
 
9
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,169 +1,12 @@
0
+RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
0
+WIN = (PLATFORM =~ /mswin|cygwin/)
0
+SUDO = (WIN ? "" : "sudo")
0
+
0
+require 'rake'
0
+require 'rake/clean'
0
 require 'lib/thin'
0
-require 'echoe'
0
 
0
-# sudo flag
0
-windows = (PLATFORM =~ /mswin|cygwin/)
0
-SUDO = windows ? "" : "sudo"
0
+Dir['tasks/**/*.rake'].each { |rake| load rake }
0
 
0
-# ruby version
0
-RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
0
-def gem
0
- RUBY_1_9 ? 'gem19' : 'gem'
0
-end
0
-
0
-# ragel
0
-RAGEL_BASE = 'parser'
0
-RAGEL_TARGET = "#{RAGEL_BASE}.c"
0
-RAGEL_FILE = "#{RAGEL_BASE}.rl"
0
-
0
-# ext
0
-EXT_BASE = 'thin_parser'
0
-EXT_DIR = "ext/#{EXT_BASE}"
0
-EXT_BUNDLE = "#{EXT_DIR}/#{EXT_BASE}.#{Config::CONFIG['DLEXT']}"
0
-SO_FILE = "#{EXT_BASE}.so"
0
-
0
-Echoe.new(Thin::NAME) do |p|
0
- p.author = "Marc-Andre Cournoyer"
0
- p.email = "macournoyer@gmail.com"
0
- p.description = "Thin takes the http parser from Mongrel, the
0
- connection engine from EventMachine and the web server interface
0
- from Rack, creating a highly flexible, small, fast, and sexy
0
- web app server for Ruby."
0
- p.summary = "A thin and fast web server"
0
- p.url = "http://code.macournoyer.com/thin/"
0
- p.docs_host = "macournoyer.com:~/code.macournoyer.com/thin/doc/"
0
- p.clean_pattern = ['ext/thin_parser/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/thin_parser/Makefile', 'pkg', 'lib/*.bundle', '*.gem', '*.gemspec', '.config', 'coverage']
0
- p.ignore_pattern = /^(.git|benchmark|site|tasks)|.gitignore/
0
- p.rdoc_pattern = ['README', 'LICENSE', 'changes.txt', 'lib/**/*.rb', 'doc/**/*.rdoc']
0
- p.ruby_version = '>= 1.8.6'
0
- p.dependencies = ['rack >= 0.2.0']
0
- p.extension_pattern = nil
0
- p.need_tar_gz = false
0
-
0
- if RUBY_PLATFORM !~ /mswin/
0
- p.extension_pattern = ["ext/**/extconf.rb"]
0
- end
0
-
0
- p.eval = proc do
0
- case RUBY_PLATFORM
0
- when /mswin/
0
- self.files += ['lib/thin_parser.so']
0
- add_dependency('eventmachine', '>= 0.8.1')
0
- else
0
- add_dependency('daemons', '>= 1.0.9')
0
- add_dependency('eventmachine')
0
- end
0
- end
0
-end
0
-
0
-task :clean => :clobber_package
0
-
0
-task :tag_warn do
0
- puts "*" * 40
0
- puts "Don't forget to tag the release:"
0
- puts " git tag -a v#{Thin::VERSION::STRING}"
0
- puts "*" * 40
0
-end
0
-
0
-task :gem => [:compile,:tag_warn]
0
-
0
-desc "Compile the Ragel state machines"
0
-task :ragel do
0
- Dir.chdir EXT_DIR do
0
- File.unlink RAGEL_TARGET if File.exist? RAGEL_TARGET
0
- sh "ragel #{RAGEL_FILE} | rlgen-cd -G2 -o #{RAGEL_TARGET}"
0
- raise "Failed to compile Ragel state machine" unless File.exist? RAGEL_TARGET
0
- end
0
-end
0
-
0
-case RUBY_PLATFORM
0
-when /mswin/
0
- FILENAME = "lib/#{SO_FILE}"
0
- file FILENAME do
0
- Dir.chdir EXT_DIR do
0
- ruby "extconf.rb"
0
- system('nmake')
0
- end
0
- cp EXT_BUNDLE, 'lib/'
0
- end
0
- desc "compile mswin32 extension"
0
- task :compile => [FILENAME]
0
-else
0
- # task :compile defined by echoe due to defined extension_pattern
0
-end
0
-
0
-namespace :deploy do
0
- task :site => %w(site:upload rdoc:upload)
0
-
0
- desc 'Deploy on code.macournoyer.com'
0
- task :alpha => %w(gem:upload deploy:site)
0
-
0
- desc 'Deploy on rubyforge'
0
- task :public => %w(gem:upload_rubyforge deploy:site)
0
-end
0
-desc 'Deploy on all servers'
0
-task :deploy => %w(deploy:alpha deploy:public)
0
-
0
-def upload(file, to, options={})
0
- sh %{ssh macournoyer@macournoyer.com "rm -rf code.macournoyer.com/#{to}"} if options[:replace]
0
- sh %{scp -rq #{file} macournoyer@macournoyer.com:code.macournoyer.com/#{to}}
0
-end
0
-
0
-namespace :site do
0
- task :build do
0
- mkdir_p 'tmp/site/images'
0
- cd 'tmp/site' do
0
- sh "SITE_ROOT='/thin' ruby ../../site/thin.rb --dump"
0
- end
0
- cp 'site/style.css', 'tmp/site'
0
- cp_r Dir['site/images/*'], 'tmp/site/images'
0
- end
0
-
0
- desc 'Upload website to code.macournoyer.com'
0
- task :upload => 'site:build' do
0
- upload 'tmp/site/*', 'thin'
0
- end
0
-end
0
-
0
-if RUBY_1_9
0
- task :spec do
0
- warn 'RSpec not yet supporting Ruby 1.9, so cannot run the specs :('
0
- end
0
-else
0
- # RSpec not yet working w/ Ruby 1.9
0
- require 'spec/rake/spectask'
0
-
0
- desc "Run all examples"
0
- Spec::Rake::SpecTask.new('spec') do |t|
0
- t.spec_files = FileList['spec/**/*_spec.rb']
0
- end
0
-end
0
-
0
 task :default => [:compile, :spec]
0
-
0
-desc 'Show some stats about the code'
0
-task :stats do
0
- line_count = proc do |path|
0
- Dir[path].collect { |f| File.open(f).readlines.reject { |l| l =~ /(^\s*(\#|\/\*))|^\s*$/ }.size }.inject(0){ |sum,n| sum += n }
0
- end
0
- lib = line_count['lib/**/*.rb']
0
- ext = line_count['ext/**/*.{c,h}']
0
- spec = line_count['spec/**/*.rb']
0
- ratio = '%1.2f' % (spec.to_f / lib.to_f)
0
-
0
- puts "#{lib.to_s.rjust(6)} LOC of lib"
0
- puts "#{ext.to_s.rjust(6)} LOC of ext"
0
- puts "#{spec.to_s.rjust(6)} LOC of spec"
0
- puts "#{ratio.to_s.rjust(6)} ratio lib/spec"
0
-end
0
-
0
-desc "install the gem"
0
-task :thin_install => [:clean,:package] do
0
- sh %{#{SUDO} #{gem} install pkg/#{Thin::NAME}-#{Thin::VERSION::STRING}*.gem --no-update-sources}
0
-end
0
-
0
-desc "uninstall the gem"
0
-task :thin_uninstall => :clean do
0
- sh %{#{SUDO} #{gem} uninstall #{Thin::NAME}}
0
-end
0
...
1
2
3
 
4
5
6
7
 
8
9
10
11
12
13
 
 
 
 
 
 
 
 
14
15
16
17
 
...
1
2
3
4
5
6
 
 
7
8
9
 
 
 
10
11
12
13
14
15
16
17
18
19
 
20
 
21
0
@@ -1,18 +1,22 @@
0
 == BUGS
0
  * Carl Mercier is experiencing weird stuff, response headers seems to be happened
0
    to the top of every HTML page in the browser ?wtf?
0
+ * Thin uses more memory then Mongrel on some apps, investigate why
0
 
0
 == FEATURES
0
- * Add --prefix option to thin script
0
- * IPv6 support (bind to ::1)
0
+ * IPv6 support (should be able to bind to ::1)
0
  
0
 == TASKS
0
- * Add a better god sample file in example, maybe generate one !?
0
- * Change benchmarking test to use
0
- http://blog.evanweaver.com/files/doc/fauna/benchmark_unit/
0
  * Provide precompiled win32 binaries in Gem
0
+ * Load options from a config file
0
+ * Create a Stats adapter to show server stats in the browser
0
+ * Check for memory usage/leaks using dike or other.
0
+ * Change benchmarking tests to use
0
+ http://blog.evanweaver.com/files/doc/fauna/benchmark_unit/
0
+ * Add a better god sample file in example/,
0
+ maybe generate one w/ thin config and use this in replacement
0
+ of mongrel_cluster to launch cluster at startup and all.
0
  * Port response writing to a C extension
0
- * Benchmark CGI and FastCGI too [Carlos Junior]
0
  * Investigate http://rev.rubyforge.org/ (only Ruby 1.9)
0
- * Check for memory usage/leaks using dike or other.
0
+ * Benchmark CGI and FastCGI too [Carlos Junior]
...
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
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,87 +1 @@
0
-== Process
0
-* rackup ...
0
-* nice -n20 httperf --port 9292 --num-conns 9000
0
-* nice -n20 ab -n5000 localhost:9292/
0
-* nice -n20 ab -n5000 -c10 localhost:9292/
0
-* nice -n20 ab -n5000 -c100 localhost:9292/
0
-
0
-== More Benchmarks
0
-http://www.webficient.com/2007/08/testing-various-configurations-of-rails.html
0
-
0
-=== WEBrick
0
-rackup -s webrick
0
-
0
-==== httperf
0
-Reply rate [replies/s]: min 303.8 avg 306.8 max 310.4 stddev 2.8 (5 samples)
0
-Reply rate [replies/s]: min 235.8 avg 292.2 max 306.4 stddev 27.7 (6 samples)
0
-Reply rate [replies/s]: min 304.8 avg 306.9 max 308.8 stddev 1.5 (5 samples)
0
- avg: 302.0 10.7
0
-
0
-==== Concurrency Level 1
0
-297.37 [#/sec] (mean)
0
-
0
-==== Concurrency Level 10
0
-296.65 [#/sec] (mean) Failed requests: 4 (Connect: 2, Length: 2, Exceptions: 0)
0
-298.22 [#/sec] (mean) Failed requests: 4 (Connect: 2, Length: 2, Exceptions: 0)
0
-
0
-==== Concurrency Level 100
0
-297.16 [#/sec] (mean) Failed requests: 489 (Connect: 245, Length: 244, Exceptions: 0)
0
-
0
-
0
-=== Mongrel
0
-rackup -s mongrel
0
-
0
-==== httperf
0
-Reply rate [replies/s]: min 556.4 avg 580.1 max 613.6 stddev 29.9 (3 samples)
0
-Reply rate [replies/s]: min 299.0 avg 502.6 max 613.4 stddev 176.5 (3 samples)
0
-Reply rate [replies/s]: min 601.0 avg 608.5 max 616.0 stddev 10.7 (2 samples)
0
-Reply rate [replies/s]: min 605.2 avg 608.4 max 611.6 stddev 4.5 (2 samples)
0
- avg: 574.9 55.4
0
-
0
-==== Concurrency Level 1
0
-556.67 [#/sec] (mean)
0
-
0
-==== Concurrency Level 10
0
-622.90 [#/sec] (mean)
0
-
0
-==== Concurrency Level 100
0
-428.23 [#/sec] (mean)
0
-
0
-=== Evented Mongrel
0
-rackup -r "swiftcore/evented_mongrel" -s mongrel
0
-
0
-==== httperf
0
-Reply rate [replies/s]: min 452.4 avg 541.0 max 590.0 stddev 76.9 (3 samples)
0
-Reply rate [replies/s]: min 573.2 avg 586.0 max 593.0 stddev 11.1 (3 samples)
0
-Reply rate [replies/s]: min 546.6 avg 574.8 max 594.6 stddev 25.0 (3 samples)
0
-Reply rate [replies/s]: min 593.6 avg 595.2 max 596.4 stddev 1.5 (3 samples)
0
- avg: 574.25 28.625
0
-
0
-==== Concurrency Level 1
0
-517.97 [#/sec] (mean)
0
-
0
-==== Concurrency Level 10
0
-657.89 [#/sec] (mean)
0
-
0
-==== Concurrency Level 100
0
-656.17 [#/sec] (mean)
0
-
0
-=== Thin
0
-rackup -s thin
0
-
0
-==== httperf
0
-Reply rate [replies/s]: min 671.4 avg 681.0 max 690.7 stddev 13.6 (2 samples)
0
-Reply rate [replies/s]: min 690.0 avg 695.8 max 701.7 stddev 8.3 (2 samples)
0
-Reply rate [replies/s]: min 643.4 avg 669.4 max 695.4 stddev 36.7 (2 samples)
0
-Reply rate [replies/s]: min 694.1 avg 695.8 max 697.6 stddev 2.5 (2 samples)
0
- avg: 685.5 15.275
0
-
0
-==== Concurrency Level 1
0
-719.53 [#/sec] (mean)
0
-
0
-==== Concurrency Level 10
0
-782.11 [#/sec] (mean)
0
-
0
-==== Concurrency Level 100
0
-776.40 [#/sec] (mean)
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
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
0
@@ -1 +1,87 @@
0
+== Process
0
+* rackup ...
0
+* nice -n20 httperf --port 9292 --num-conns 9000
0
+* nice -n20 ab -n5000 localhost:9292/
0
+* nice -n20 ab -n5000 -c10 localhost:9292/
0
+* nice -n20 ab -n5000 -c100 localhost:9292/
0
+
0
+== More Benchmarks
0
+http://www.webficient.com/2007/08/testing-various-configurations-of-rails.html
0
+
0
+=== WEBrick
0
+rackup -s webrick
0
+
0
+==== httperf
0
+Reply rate [replies/s]: min 303.8 avg 306.8 max 310.4 stddev 2.8 (5 samples)
0
+Reply rate [replies/s]: min 235.8 avg 292.2 max 306.4 stddev 27.7 (6 samples)
0
+Reply rate [replies/s]: min 304.8 avg 306.9 max 308.8 stddev 1.5 (5 samples)
0
+ avg: 302.0 10.7
0
+
0
+==== Concurrency Level 1
0
+297.37 [#/sec] (mean)
0
+
0
+==== Concurrency Level 10
0
+296.65 [#/sec] (mean) Failed requests: 4 (Connect: 2, Length: 2, Exceptions: 0)
0
+298.22 [#/sec] (mean) Failed requests: 4 (Connect: 2, Length: 2, Exceptions: 0)
0
+
0
+==== Concurrency Level 100
0
+297.16 [#/sec] (mean) Failed requests: 489 (Connect: 245, Length: 244, Exceptions: 0)
0
+
0
+
0
+=== Mongrel
0
+rackup -s mongrel
0
+
0
+==== httperf
0
+Reply rate [replies/s]: min 556.4 avg 580.1 max 613.6 stddev 29.9 (3 samples)
0
+Reply rate [replies/s]: min 299.0 avg 502.6 max 613.4 stddev 176.5 (3 samples)
0
+Reply rate [replies/s]: min 601.0 avg 608.5 max 616.0 stddev 10.7 (2 samples)
0
+Reply rate [replies/s]: min 605.2 avg 608.4 max 611.6 stddev 4.5 (2 samples)
0
+ avg: 574.9 55.4
0
+
0
+==== Concurrency Level 1
0
+556.67 [#/sec] (mean)
0
+
0
+==== Concurrency Level 10
0
+622.90 [#/sec] (mean)
0
+
0
+==== Concurrency Level 100
0
+428.23 [#/sec] (mean)
0
+
0
+=== Evented Mongrel
0
+rackup -r "swiftcore/evented_mongrel" -s mongrel
0
+
0
+==== httperf
0
+Reply rate [replies/s]: min 452.4 avg 541.0 max 590.0 stddev 76.9 (3 samples)
0
+Reply rate [replies/s]: min 573.2 avg 586.0 max 593.0 stddev 11.1 (3 samples)
0
+Reply rate [replies/s]: min 546.6 avg 574.8 max 594.6 stddev 25.0 (3 samples)
0
+Reply rate [replies/s]: min 593.6 avg 595.2 max 596.4 stddev 1.5 (3 samples)
0
+ avg: 574.25 28.625
0
+
0
+==== Concurrency Level 1
0
+517.97 [#/sec] (mean)
0
+
0
+==== Concurrency Level 10
0
+657.89 [#/sec] (mean)
0
+
0
+==== Concurrency Level 100
0
+656.17 [#/sec] (mean)
0
+
0
+=== Thin
0
+rackup -s thin
0
+
0
+==== httperf
0
+Reply rate [replies/s]: min 671.4 avg 681.0 max 690.7 stddev 13.6 (2 samples)
0
+Reply rate [replies/s]: min 690.0 avg 695.8 max 701.7 stddev 8.3 (2 samples)
0
+Reply rate [replies/s]: min 643.4 avg 669.4 max 695.4 stddev 36.7 (2 samples)
0
+Reply rate [replies/s]: min 694.1 avg 695.8 max 697.6 stddev 2.5 (2 samples)
0
+ avg: 685.5 15.275
0
+
0
+==== Concurrency Level 1
0
+719.53 [#/sec] (mean)
0
+
0
+==== Concurrency Level 10
0
+782.11 [#/sec] (mean)
0
+
0
+==== Concurrency Level 100
0
+776.40 [#/sec] (mean)
...
138
139
140
141
 
 
 
142
143
144
...
138
139
140
 
141
142
143
144
145
146
0
@@ -138,7 +138,9 @@
0
       li { a "Kevin Williams Blog", :href => 'http://www.almostserio.us/articles/2008/01/11/thin-web-server-for-ruby-rocks' }
0
       li { a "Dinooz", :href => 'http://www.nicomoayudarte.com/' }
0
       li { a "Mobile Dyne Systems", :href => 'http://www.mobiledyne.com/' }
0
- li { a "Mobile Dyne Systems", :href => 'http://feelfree.homelinux.com' }
0
+ li { a "feelfree.homelinux.com", :href => 'http://feelfree.homelinux.com' }
0
+ li { a "to2posts.com", :href => 'http://to2blogs.com/' }
0
+ li { a "James on Software", :href => 'http://jamesgolick.com/' }
0
     end
0
     
0
     p { "If you'd like to have your site listed here, #{a 'drop me an email', :href => 'mailto:macournoyer@gmail.com'}" }
...
15
16
17
18
19
20
21
22
23
24
 
 
 
 
25
26
27
28
...
59
60
61
62
63
 
 
64
65
 
 
 
 
 
 
 
 
 
66
67
68
...
15
16
17
 
 
 
 
 
 
18
19
20
21
22
23
24
25
26
...
57
58
59
 
 
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
0
@@ -15,13 +15,11 @@
0
 
0
   s.required_ruby_version = '>= 1.8.6' # Makes sure the CGI eof fix is there
0
   
0
- if WIN
0
- s.add_dependency 'eventmachine', '>= 0.8.1' # Latest precompiled version released
0
- else
0
- s.add_dependency 'eventmachine'
0
- s.add_dependency 'daemons', '>= 1.0.9' # Daemonizing doesn't work on win
0
- end
0
   s.add_dependency 'rack', '>= 0.2.0'
0
+ s.add_dependency 'eventmachine', '>= 0.8.1'
0
+ unless WIN
0
+ s.add_dependency 'daemons', '>= 1.0.9'
0
+ end
0
 
0
   s.files = %w(COPYING CHANGELOG README Rakefile) +
0
                             Dir.glob("{benchmark,bin,doc,example,lib,spec}/**/*") +
0
0
@@ -59,10 +57,19 @@
0
   desc 'Upload gem to rubyforge.org'
0
   task :upload_rubyforge => :gem do
0
     sh 'rubyforge login'
0
- sh "rubyforge add_release thin thin #{Thin::VERSION::STRING} pkg/thin-#{Thin::VERSION::STRING}.gem"
0
- sh "rubyforge add_file thin thin #{Thin::VERSION::STRING} pkg/thin-#{Thin::VERSION::STRING}.gem"
0
+ sh "rubyforge add_release thin thin #{Thin::VERSION::STRING} pkg/#{spec.full_name}.gem"
0
+ sh "rubyforge add_file thin thin #{Thin::VERSION::STRING} pkg/#{spec.full_name}.gem"
0
   end
0
 end
0
+
0
+task :install => [:clobber, :compile, :package] do
0
+ sh "#{SUDO} #{gem} install pkg/#{spec.full_name}.gem"
0
+end
0
+
0
+task :uninstall => :clean do
0
+ sh "#{SUDO} #{gem} uninstall -v #{Thin::VERSION::STRING} -x #{Thin::NAME}"
0
+end
0
+
0
 
0
 def gem
0
   RUBY_1_9 ? 'gem19' : 'gem'

Comments

    No one has commented yet.