mongrel 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +2 -0
- data/CHANGELOG +2 -0
- data/Manifest +68 -0
- data/bin/mongrel_rails +55 -22
- data/examples/camping/README +3 -0
- data/examples/httpd.conf +474 -0
- data/examples/mime.yaml +3 -0
- data/examples/mongrel.conf +9 -0
- data/examples/monitrc +57 -0
- data/ext/http11/http11.c +25 -12
- data/ext/http11/http11_parser.c +456 -331
- data/ext/http11/http11_parser.h +1 -0
- data/ext/http11/http11_parser.java.rl +170 -0
- data/ext/http11/http11_parser.rl +8 -48
- data/ext/http11/http11_parser_common.rl +54 -0
- data/ext/http11/tst.h +2 -2
- data/ext/http11/tst_cleanup.c +0 -1
- data/ext/http11/tst_insert.c +29 -3
- data/ext/http11/tst_search.c +60 -55
- data/lib/mongrel.rb +68 -53
- data/lib/mongrel/cgi.rb +3 -3
- data/lib/mongrel/command.rb +1 -1
- data/lib/mongrel/configurator.rb +41 -31
- data/lib/mongrel/debug.rb +2 -5
- data/lib/mongrel/handlers.rb +23 -9
- data/lib/mongrel/mime_types.yml +2 -1
- data/lib/mongrel/rails.rb +7 -15
- data/mongrel-public_cert.pem +20 -0
- data/mongrel.gemspec +211 -0
- data/test/jruby_socket.rb +39 -0
- data/test/test_cgi_wrapper.rb +26 -0
- data/test/test_command.rb +1 -4
- data/test/test_conditional.rb +6 -18
- data/test/test_configurator.rb +5 -8
- data/test/test_debug.rb +3 -11
- data/test/test_handlers.rb +8 -10
- data/test/test_http11.rb +24 -5
- data/test/test_redirect_handler.rb +2 -6
- data/test/test_request_progress.rb +5 -9
- data/test/test_response.rb +24 -3
- data/test/test_stats.rb +1 -3
- data/test/test_uriclassifier.rb +170 -81
- data/test/test_ws.rb +25 -24
- data/test/testhelp.rb +26 -3
- data/tools/trickletest.rb +2 -2
- metadata +138 -333
- metadata.gz.sig +0 -0
- data/Rakefile +0 -117
- data/doc/rdoc/classes/IO.html +0 -170
- data/doc/rdoc/classes/IO.src/M000003.html +0 -19
- data/doc/rdoc/classes/IO.src/M000004.html +0 -19
- data/doc/rdoc/classes/Kernel.html +0 -159
- data/doc/rdoc/classes/Kernel.src/M000012.html +0 -19
- data/doc/rdoc/classes/Kernel.src/M000013.html +0 -23
- data/doc/rdoc/classes/Mongrel.html +0 -204
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +0 -404
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000115.html +0 -25
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000116.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000117.html +0 -34
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000118.html +0 -32
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000119.html +0 -25
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000120.html +0 -18
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000121.html +0 -18
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000122.html +0 -18
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000123.html +0 -19
- data/doc/rdoc/classes/Mongrel/Camping.html +0 -177
- data/doc/rdoc/classes/Mongrel/Camping.src/M000041.html +0 -22
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +0 -184
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000042.html +0 -20
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000043.html +0 -58
- data/doc/rdoc/classes/Mongrel/Command.html +0 -132
- data/doc/rdoc/classes/Mongrel/Command/Base.html +0 -384
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000018.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000019.html +0 -42
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000020.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000021.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000022.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000023.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +0 -22
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +0 -192
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000031.html +0 -20
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000032.html +0 -29
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000033.html +0 -58
- data/doc/rdoc/classes/Mongrel/Configurator.html +0 -716
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000093.html +0 -27
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000094.html +0 -31
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000095.html +0 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000096.html +0 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000097.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000098.html +0 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +0 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +0 -38
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000101.html +0 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +0 -39
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +0 -33
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +0 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +0 -24
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +0 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +0 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +0 -22
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +0 -22
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +0 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +0 -34
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +0 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +0 -36
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +0 -18
- data/doc/rdoc/classes/Mongrel/Const.html +0 -337
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +0 -188
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000124.html +0 -19
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000125.html +0 -23
- data/doc/rdoc/classes/Mongrel/DirHandler.html +0 -303
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000051.html +0 -21
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000052.html +0 -42
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000053.html +0 -38
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000054.html +0 -65
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000055.html +0 -39
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +0 -18
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +0 -171
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000126.html +0 -18
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000127.html +0 -18
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +0 -190
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000066.html +0 -21
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000067.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +0 -215
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000072.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000073.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000074.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +0 -210
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000014.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000015.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000016.html +0 -19
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000017.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpParams.html +0 -131
- data/doc/rdoc/classes/Mongrel/HttpParser.html +0 -278
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000044.html +0 -28
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000045.html +0 -29
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000046.html +0 -29
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000047.html +0 -59
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000048.html +0 -27
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000049.html +0 -27
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000050.html +0 -28
- data/doc/rdoc/classes/Mongrel/HttpParserError.html +0 -111
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +0 -284
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000133.html +0 -50
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000134.html +0 -41
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000135.html +0 -29
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000136.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000137.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +0 -32
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +0 -443
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +0 -26
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +0 -22
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +0 -22
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +0 -22
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +0 -31
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpServer.html +0 -402
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000057.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000058.html +0 -100
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000059.html +0 -32
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000060.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000061.html +0 -29
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +0 -65
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +0 -34
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +0 -22
- data/doc/rdoc/classes/Mongrel/Rails.html +0 -112
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +0 -225
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000034.html +0 -37
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000035.html +0 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000036.html +0 -26
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +0 -263
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000037.html +0 -23
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000038.html +0 -56
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000039.html +0 -20
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000040.html +0 -25
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +0 -187
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000131.html +0 -22
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000132.html +0 -27
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +0 -211
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000128.html +0 -24
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000129.html +0 -24
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000130.html +0 -18
- data/doc/rdoc/classes/Mongrel/Stats.html +0 -309
- data/doc/rdoc/classes/Mongrel/Stats.src/M000139.html +0 -19
- data/doc/rdoc/classes/Mongrel/Stats.src/M000140.html +0 -23
- data/doc/rdoc/classes/Mongrel/Stats.src/M000141.html +0 -26
- data/doc/rdoc/classes/Mongrel/Stats.src/M000142.html +0 -18
- data/doc/rdoc/classes/Mongrel/Stats.src/M000143.html +0 -18
- data/doc/rdoc/classes/Mongrel/Stats.src/M000144.html +0 -18
- data/doc/rdoc/classes/Mongrel/Stats.src/M000145.html +0 -23
- data/doc/rdoc/classes/Mongrel/Stats.src/M000146.html +0 -20
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +0 -194
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000068.html +0 -18
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000069.html +0 -24
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000070.html +0 -42
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +0 -20
- data/doc/rdoc/classes/Mongrel/StopServer.html +0 -117
- data/doc/rdoc/classes/Mongrel/TimeoutError.html +0 -117
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +0 -317
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000087.html +0 -18
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +0 -18
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +0 -39
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +0 -51
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +0 -36
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +0 -83
- data/doc/rdoc/classes/MongrelDbg.html +0 -209
- data/doc/rdoc/classes/MongrelDbg.src/M000007.html +0 -24
- data/doc/rdoc/classes/MongrelDbg.src/M000008.html +0 -20
- data/doc/rdoc/classes/MongrelDbg.src/M000009.html +0 -22
- data/doc/rdoc/classes/MongrelDbg.src/M000010.html +0 -21
- data/doc/rdoc/classes/MongrelDbg.src/M000011.html +0 -18
- data/doc/rdoc/classes/Mutex.html +0 -158
- data/doc/rdoc/classes/Mutex.src/M000001.html +0 -24
- data/doc/rdoc/classes/Mutex.src/M000002.html +0 -32
- data/doc/rdoc/classes/RequestLog.html +0 -115
- data/doc/rdoc/classes/RequestLog/Access.html +0 -151
- data/doc/rdoc/classes/RequestLog/Access.src/M000147.html +0 -19
- data/doc/rdoc/classes/RequestLog/Files.html +0 -144
- data/doc/rdoc/classes/RequestLog/Files.src/M000148.html +0 -19
- data/doc/rdoc/classes/RequestLog/Objects.html +0 -150
- data/doc/rdoc/classes/RequestLog/Objects.src/M000150.html +0 -51
- data/doc/rdoc/classes/RequestLog/Params.html +0 -144
- data/doc/rdoc/classes/RequestLog/Params.src/M000151.html +0 -19
- data/doc/rdoc/classes/RequestLog/Threads.html +0 -144
- data/doc/rdoc/classes/RequestLog/Threads.src/M000149.html +0 -34
- data/doc/rdoc/classes/TCPServer.html +0 -173
- data/doc/rdoc/classes/TCPServer.src/M000005.html +0 -19
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/COPYING.html +0 -168
- data/doc/rdoc/files/LICENSE.html +0 -168
- data/doc/rdoc/files/README.html +0 -213
- data/doc/rdoc/files/ext/http11/http11_c.html +0 -101
- data/doc/rdoc/files/lib/mongrel/camping_rb.html +0 -120
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +0 -120
- data/doc/rdoc/files/lib/mongrel/command_rb.html +0 -123
- data/doc/rdoc/files/lib/mongrel/configurator_rb.html +0 -111
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +0 -122
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +0 -122
- data/doc/rdoc/files/lib/mongrel/init_rb.html +0 -121
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +0 -123
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +0 -113
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +0 -113
- data/doc/rdoc/files/lib/mongrel_rb.html +0 -135
- data/doc/rdoc/files/lib/mutex_fix_rb.html +0 -108
- data/doc/rdoc/fr_class_index.html +0 -68
- data/doc/rdoc/fr_file_index.html +0 -42
- data/doc/rdoc/fr_method_index.html +0 -177
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
- data/tools/rakehelp.rb +0 -117
@@ -1,24 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (Mongrel::StatisticsFilter)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 327</span>
|
14
|
-
327: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
|
15
|
-
328: <span class="ruby-ivar">@sample_rate</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:sample_rate</span>] <span class="ruby-operator">||</span> <span class="ruby-value">300</span>
|
16
|
-
329:
|
17
|
-
330: <span class="ruby-ivar">@processors</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"processors"</span>)
|
18
|
-
331: <span class="ruby-ivar">@reqsize</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"request Kb"</span>)
|
19
|
-
332: <span class="ruby-ivar">@headcount</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"req param count"</span>)
|
20
|
-
333: <span class="ruby-ivar">@respsize</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"response Kb"</span>)
|
21
|
-
334: <span class="ruby-ivar">@interreq</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"inter-request time"</span>)
|
22
|
-
335: <span class="ruby-keyword kw">end</span></pre>
|
23
|
-
</body>
|
24
|
-
</html>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>process (Mongrel::StatisticsFilter)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 338</span>
|
14
|
-
338: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
|
15
|
-
339: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@sample_rate</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@sample_rate</span>
|
16
|
-
340: <span class="ruby-ivar">@processors</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">workers</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span>)
|
17
|
-
341: <span class="ruby-ivar">@headcount</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>.<span class="ruby-identifier">length</span>)
|
18
|
-
342: <span class="ruby-ivar">@reqsize</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
|
19
|
-
343: <span class="ruby-ivar">@respsize</span>.<span class="ruby-identifier">sample</span>((<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
|
20
|
-
344: <span class="ruby-keyword kw">end</span>
|
21
|
-
345: <span class="ruby-ivar">@interreq</span>.<span class="ruby-identifier">tick</span>
|
22
|
-
346: <span class="ruby-keyword kw">end</span></pre>
|
23
|
-
</body>
|
24
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>dump (Mongrel::StatisticsFilter)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 348</span>
|
14
|
-
348: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>
|
15
|
-
349: <span class="ruby-node">"#{@processors.to_s}\n#{@reqsize.to_s}\n#{@headcount.to_s}\n#{@respsize.to_s}\n#{@interreq.to_s}"</span>
|
16
|
-
350: <span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,309 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Mongrel::Stats</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Mongrel::Stats</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/mongrel/stats_rb.html">
|
59
|
-
lib/mongrel/stats.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="method-list">
|
86
|
-
<h3 class="section-bar">Methods</h3>
|
87
|
-
|
88
|
-
<div class="name-list">
|
89
|
-
<a href="#M000142">dump</a>
|
90
|
-
<a href="#M000144">mean</a>
|
91
|
-
<a href="#M000139">new</a>
|
92
|
-
<a href="#M000140">reset</a>
|
93
|
-
<a href="#M000141">sample</a>
|
94
|
-
<a href="#M000145">sd</a>
|
95
|
-
<a href="#M000146">tick</a>
|
96
|
-
<a href="#M000143">to_s</a>
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
<!-- if includes -->
|
104
|
-
|
105
|
-
<div id="section">
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
<div id="attribute-list">
|
112
|
-
<h3 class="section-bar">Attributes</h3>
|
113
|
-
|
114
|
-
<div class="name-list">
|
115
|
-
<table>
|
116
|
-
<tr class="top-aligned-row context-row">
|
117
|
-
<td class="context-item-name">max</td>
|
118
|
-
<td class="context-item-value"> [R] </td>
|
119
|
-
<td class="context-item-desc"></td>
|
120
|
-
</tr>
|
121
|
-
<tr class="top-aligned-row context-row">
|
122
|
-
<td class="context-item-name">min</td>
|
123
|
-
<td class="context-item-value"> [R] </td>
|
124
|
-
<td class="context-item-desc"></td>
|
125
|
-
</tr>
|
126
|
-
<tr class="top-aligned-row context-row">
|
127
|
-
<td class="context-item-name">n</td>
|
128
|
-
<td class="context-item-value"> [R] </td>
|
129
|
-
<td class="context-item-desc"></td>
|
130
|
-
</tr>
|
131
|
-
<tr class="top-aligned-row context-row">
|
132
|
-
<td class="context-item-name">sum</td>
|
133
|
-
<td class="context-item-value"> [R] </td>
|
134
|
-
<td class="context-item-desc"></td>
|
135
|
-
</tr>
|
136
|
-
<tr class="top-aligned-row context-row">
|
137
|
-
<td class="context-item-name">sumsq</td>
|
138
|
-
<td class="context-item-value"> [R] </td>
|
139
|
-
<td class="context-item-desc"></td>
|
140
|
-
</tr>
|
141
|
-
</table>
|
142
|
-
</div>
|
143
|
-
</div>
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<!-- if method_list -->
|
148
|
-
<div id="methods">
|
149
|
-
<h3 class="section-bar">Public Class methods</h3>
|
150
|
-
|
151
|
-
<div id="method-M000139" class="method-detail">
|
152
|
-
<a name="M000139"></a>
|
153
|
-
|
154
|
-
<div class="method-heading">
|
155
|
-
<a href="Stats.src/M000139.html" target="Code" class="method-signature"
|
156
|
-
onclick="popupCode('Stats.src/M000139.html');return false;">
|
157
|
-
<span class="method-name">new</span><span class="method-args">(name)</span>
|
158
|
-
</a>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<div class="method-description">
|
162
|
-
</div>
|
163
|
-
</div>
|
164
|
-
|
165
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
166
|
-
|
167
|
-
<div id="method-M000142" class="method-detail">
|
168
|
-
<a name="M000142"></a>
|
169
|
-
|
170
|
-
<div class="method-heading">
|
171
|
-
<a href="Stats.src/M000142.html" target="Code" class="method-signature"
|
172
|
-
onclick="popupCode('Stats.src/M000142.html');return false;">
|
173
|
-
<span class="method-name">dump</span><span class="method-args">(msg = "", out=STDERR)</span>
|
174
|
-
</a>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
<div class="method-description">
|
178
|
-
<p>
|
179
|
-
Dump this <a href="Stats.html">Stats</a> object with an optional additional
|
180
|
-
message.
|
181
|
-
</p>
|
182
|
-
</div>
|
183
|
-
</div>
|
184
|
-
|
185
|
-
<div id="method-M000144" class="method-detail">
|
186
|
-
<a name="M000144"></a>
|
187
|
-
|
188
|
-
<div class="method-heading">
|
189
|
-
<a href="Stats.src/M000144.html" target="Code" class="method-signature"
|
190
|
-
onclick="popupCode('Stats.src/M000144.html');return false;">
|
191
|
-
<span class="method-name">mean</span><span class="method-args">()</span>
|
192
|
-
</a>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<div class="method-description">
|
196
|
-
<p>
|
197
|
-
Calculates and returns the <a href="Stats.html#M000144">mean</a> for the
|
198
|
-
data passed so far.
|
199
|
-
</p>
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
|
203
|
-
<div id="method-M000140" class="method-detail">
|
204
|
-
<a name="M000140"></a>
|
205
|
-
|
206
|
-
<div class="method-heading">
|
207
|
-
<a href="Stats.src/M000140.html" target="Code" class="method-signature"
|
208
|
-
onclick="popupCode('Stats.src/M000140.html');return false;">
|
209
|
-
<span class="method-name">reset</span><span class="method-args">()</span>
|
210
|
-
</a>
|
211
|
-
</div>
|
212
|
-
|
213
|
-
<div class="method-description">
|
214
|
-
<p>
|
215
|
-
Resets the internal counters so you can start sampling again.
|
216
|
-
</p>
|
217
|
-
</div>
|
218
|
-
</div>
|
219
|
-
|
220
|
-
<div id="method-M000141" class="method-detail">
|
221
|
-
<a name="M000141"></a>
|
222
|
-
|
223
|
-
<div class="method-heading">
|
224
|
-
<a href="Stats.src/M000141.html" target="Code" class="method-signature"
|
225
|
-
onclick="popupCode('Stats.src/M000141.html');return false;">
|
226
|
-
<span class="method-name">sample</span><span class="method-args">(s)</span>
|
227
|
-
</a>
|
228
|
-
</div>
|
229
|
-
|
230
|
-
<div class="method-description">
|
231
|
-
<p>
|
232
|
-
Adds a sampling to the calculations.
|
233
|
-
</p>
|
234
|
-
</div>
|
235
|
-
</div>
|
236
|
-
|
237
|
-
<div id="method-M000145" class="method-detail">
|
238
|
-
<a name="M000145"></a>
|
239
|
-
|
240
|
-
<div class="method-heading">
|
241
|
-
<a href="Stats.src/M000145.html" target="Code" class="method-signature"
|
242
|
-
onclick="popupCode('Stats.src/M000145.html');return false;">
|
243
|
-
<span class="method-name">sd</span><span class="method-args">()</span>
|
244
|
-
</a>
|
245
|
-
</div>
|
246
|
-
|
247
|
-
<div class="method-description">
|
248
|
-
<p>
|
249
|
-
Calculates the standard deviation of the data so far.
|
250
|
-
</p>
|
251
|
-
</div>
|
252
|
-
</div>
|
253
|
-
|
254
|
-
<div id="method-M000146" class="method-detail">
|
255
|
-
<a name="M000146"></a>
|
256
|
-
|
257
|
-
<div class="method-heading">
|
258
|
-
<a href="Stats.src/M000146.html" target="Code" class="method-signature"
|
259
|
-
onclick="popupCode('Stats.src/M000146.html');return false;">
|
260
|
-
<span class="method-name">tick</span><span class="method-args">()</span>
|
261
|
-
</a>
|
262
|
-
</div>
|
263
|
-
|
264
|
-
<div class="method-description">
|
265
|
-
<p>
|
266
|
-
Adds a time delta between now and the last time you called this. This will
|
267
|
-
give you the average time between two activities.
|
268
|
-
</p>
|
269
|
-
<p>
|
270
|
-
An example is:
|
271
|
-
</p>
|
272
|
-
<pre>
|
273
|
-
t = Stats.new("do_stuff")
|
274
|
-
10000.times { do_stuff(); t.tick }
|
275
|
-
t.dump("time")
|
276
|
-
</pre>
|
277
|
-
</div>
|
278
|
-
</div>
|
279
|
-
|
280
|
-
<div id="method-M000143" class="method-detail">
|
281
|
-
<a name="M000143"></a>
|
282
|
-
|
283
|
-
<div class="method-heading">
|
284
|
-
<a href="Stats.src/M000143.html" target="Code" class="method-signature"
|
285
|
-
onclick="popupCode('Stats.src/M000143.html');return false;">
|
286
|
-
<span class="method-name">to_s</span><span class="method-args">()</span>
|
287
|
-
</a>
|
288
|
-
</div>
|
289
|
-
|
290
|
-
<div class="method-description">
|
291
|
-
<p>
|
292
|
-
Returns a common display (used by <a href="Stats.html#M000142">dump</a>)
|
293
|
-
</p>
|
294
|
-
</div>
|
295
|
-
</div>
|
296
|
-
|
297
|
-
|
298
|
-
</div>
|
299
|
-
|
300
|
-
|
301
|
-
</div>
|
302
|
-
|
303
|
-
|
304
|
-
<div id="validator-badges">
|
305
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
306
|
-
</div>
|
307
|
-
|
308
|
-
</body>
|
309
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (Mongrel::Stats)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/stats.rb, line 19</span>
|
14
|
-
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>)
|
15
|
-
20: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
16
|
-
21: <span class="ruby-identifier">reset</span>
|
17
|
-
22: <span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>reset (Mongrel::Stats)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/stats.rb, line 25</span>
|
14
|
-
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
|
15
|
-
26: <span class="ruby-ivar">@sum</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
16
|
-
27: <span class="ruby-ivar">@sumsq</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
17
|
-
28: <span class="ruby-ivar">@last_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
18
|
-
29: <span class="ruby-ivar">@n</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
19
|
-
30: <span class="ruby-ivar">@min</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
20
|
-
31: <span class="ruby-ivar">@max</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
21
|
-
32: <span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>sample (Mongrel::Stats)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/stats.rb, line 35</span>
|
14
|
-
35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sample</span>(<span class="ruby-identifier">s</span>)
|
15
|
-
36: <span class="ruby-ivar">@sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">s</span>
|
16
|
-
37: <span class="ruby-ivar">@sumsq</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">s</span>
|
17
|
-
38: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@n</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
18
|
-
39: <span class="ruby-ivar">@min</span> = <span class="ruby-ivar">@max</span> = <span class="ruby-identifier">s</span>
|
19
|
-
40: <span class="ruby-keyword kw">else</span>
|
20
|
-
41: <span class="ruby-ivar">@min</span> = <span class="ruby-identifier">s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@min</span> <span class="ruby-operator">></span> <span class="ruby-identifier">s</span>
|
21
|
-
42: <span class="ruby-ivar">@max</span> = <span class="ruby-identifier">s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@max</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">s</span>
|
22
|
-
43: <span class="ruby-keyword kw">end</span>
|
23
|
-
44: <span class="ruby-ivar">@n</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
|
24
|
-
45: <span class="ruby-keyword kw">end</span></pre>
|
25
|
-
</body>
|
26
|
-
</html>
|