rfuzz 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/doc/rdoc/classes/RFuzz.html +1 -1
- data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
- data/doc/rdoc/classes/RFuzz/Browser.src/M000084.html +12 -10
- data/doc/rdoc/classes/RFuzz/Browser.src/M000085.html +10 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000086.html +24 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +72 -64
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000020.html +12 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +21 -15
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +15 -17
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +17 -22
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -9
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +9 -31
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +31 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000027.html +25 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000028.html +13 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html +21 -5
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +5 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000031.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.html +15 -15
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +9 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +5 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000034.html +18 -0
- data/doc/rdoc/classes/RFuzz/Notifier.html +36 -36
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000059.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000060.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000061.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000062.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000063.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000058.html → M000065.html} +4 -4
- data/doc/rdoc/classes/RFuzz/PushBackIO.html +55 -40
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +2 -1
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +8 -6
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +7 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +6 -31
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +32 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +5 -9
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000019.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000047.html +8 -10
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000048.html +23 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000051.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html +7 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000053.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000054.html +7 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000055.html +5 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000056.html +5 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html +9 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000058.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000072.html +6 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000073.html +10 -13
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000074.html +13 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000075.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000076.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000077.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000078.html +5 -6
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000079.html +6 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000080.html +5 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000081.html +10 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000082.html +5 -7
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000083.html +20 -0
- data/doc/rdoc/classes/RFuzz/Session.html +63 -63
- data/doc/rdoc/classes/RFuzz/Session.src/M000035.html +18 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000036.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000037.html +5 -21
- data/doc/rdoc/classes/RFuzz/Session.src/M000038.html +21 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000039.html +6 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000040.html +6 -13
- data/doc/rdoc/classes/RFuzz/Session.src/M000041.html +13 -16
- data/doc/rdoc/classes/RFuzz/Session.src/M000042.html +16 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000043.html +6 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000044.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000045.html +5 -10
- data/doc/rdoc/classes/RFuzz/Session.src/M000046.html +23 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000066.html +6 -6
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000067.html +6 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000068.html +5 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000069.html +5 -15
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000070.html +15 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000065.html → M000071.html} +5 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
- data/doc/rdoc/fr_method_index.html +76 -75
- data/examples/kill_routes.rb +5 -4
- data/examples/mongrel_test_suite/test/rails/put.rb +14 -7
- data/examples/random_sockets.rb +37 -0
- data/examples/randomizer.rb +19 -0
- data/ext/http11_client/http11_parser.c +33 -34
- data/lib/rfuzz/client.rb +1 -1
- data/lib/rfuzz/pushbackio.rb +16 -2
- data/lib/rfuzz/session.rb +1 -1
- metadata +14 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000083.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +0 -22
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000046.html +0 -21
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000050.html +0 -22
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000071.html +0 -19
- data/doc/rdoc/classes/RFuzz/Session.src/M000034.html +0 -31
@@ -5,14 +5,27 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 28</span>
|
14
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
|
15
|
+
29: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:host</span>]
|
16
|
+
30: <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:port</span>]
|
17
|
+
31: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:host</span>)
|
18
|
+
32: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:port</span>)
|
19
|
+
33: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:notifier</span>] = <span class="ruby-constant">StatsTracker</span>.<span class="ruby-identifier">new</span>
|
20
|
+
34:
|
21
|
+
35: <span class="ruby-ivar">@word_file</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:words</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-value str">".."</span>, <span class="ruby-value str">".."</span>, <span class="ruby-value str">"resources"</span>,<span class="ruby-value str">"words.txt"</span>)
|
22
|
+
36:
|
23
|
+
37: <span class="ruby-ivar">@client</span> = <span class="ruby-constant">HttpClient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@port</span>, <span class="ruby-identifier">options</span>)
|
24
|
+
38: <span class="ruby-ivar">@rand</span> = <span class="ruby-constant">RandomGenerator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">open</span>(<span class="ruby-ivar">@word_file</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>))
|
25
|
+
39:
|
26
|
+
40: <span class="ruby-ivar">@runs</span> = []
|
27
|
+
41: <span class="ruby-ivar">@counts</span> = []
|
28
|
+
42: <span class="ruby-ivar">@tracking</span> = []
|
29
|
+
43: <span class="ruby-keyword kw">end</span></pre>
|
17
30
|
</body>
|
18
31
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>cur_run (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 45</span>
|
14
|
+
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cur_run</span>
|
15
|
+
46: <span class="ruby-ivar">@runs</span>.<span class="ruby-identifier">last</span>
|
16
|
+
47: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,30 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>cur_count (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
64: <span class="ruby-comment cmt"># setup for this latest sample run</span>
|
18
|
-
65: <span class="ruby-ivar">@runs</span> <span class="ruby-operator"><<</span> {}
|
19
|
-
66: <span class="ruby-ivar">@counts</span> <span class="ruby-operator"><<</span> {}
|
20
|
-
67: <span class="ruby-ivar">@tracking</span> <span class="ruby-operator"><<</span> {}
|
21
|
-
68: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@client</span>, <span class="ruby-ivar">@rand</span>
|
22
|
-
69:
|
23
|
-
70: <span class="ruby-comment cmt"># record the request stats then reset them</span>
|
24
|
-
71: <span class="ruby-identifier">sample</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cur_run</span>[<span class="ruby-identifier">s</span>] = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">stats</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">clone</span> }
|
25
|
-
72: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">reset</span>
|
26
|
-
73: <span class="ruby-keyword kw">end</span>
|
27
|
-
74:
|
28
|
-
75: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>]
|
29
|
-
76: <span class="ruby-identifier">write_runs</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>][<span class="ruby-value">0</span>])
|
30
|
-
77: <span class="ruby-identifier">write_counts</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>][<span class="ruby-value">1</span>])
|
31
|
-
78: <span class="ruby-keyword kw">end</span>
|
32
|
-
79: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 49</span>
|
14
|
+
49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cur_count</span>
|
15
|
+
50: <span class="ruby-ivar">@counts</span>.<span class="ruby-identifier">last</span>
|
16
|
+
51: <span class="ruby-keyword kw">end</span></pre>
|
33
17
|
</body>
|
34
18
|
</html>
|
@@ -5,15 +5,30 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>run (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 61</span>
|
14
|
+
61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">count</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">options</span>={})
|
15
|
+
62: <span class="ruby-identifier">sample</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:sample</span>] <span class="ruby-operator">||</span> [<span class="ruby-identifier">:request</span>]
|
16
|
+
63: <span class="ruby-identifier">count</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
17
|
+
64: <span class="ruby-comment cmt"># setup for this latest sample run</span>
|
18
|
+
65: <span class="ruby-ivar">@runs</span> <span class="ruby-operator"><<</span> {}
|
19
|
+
66: <span class="ruby-ivar">@counts</span> <span class="ruby-operator"><<</span> {}
|
20
|
+
67: <span class="ruby-ivar">@tracking</span> <span class="ruby-operator"><<</span> {}
|
21
|
+
68: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@client</span>, <span class="ruby-ivar">@rand</span>
|
22
|
+
69:
|
23
|
+
70: <span class="ruby-comment cmt"># record the request stats then reset them</span>
|
24
|
+
71: <span class="ruby-identifier">sample</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cur_run</span>[<span class="ruby-identifier">s</span>] = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">stats</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">clone</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">stats</span>[<span class="ruby-identifier">s</span>] }
|
25
|
+
72: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">reset</span>
|
26
|
+
73: <span class="ruby-keyword kw">end</span>
|
27
|
+
74:
|
28
|
+
75: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>]
|
29
|
+
76: <span class="ruby-identifier">write_runs</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>][<span class="ruby-value">0</span>])
|
30
|
+
77: <span class="ruby-identifier">write_counts</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>][<span class="ruby-value">1</span>])
|
31
|
+
78: <span class="ruby-keyword kw">end</span>
|
32
|
+
79: <span class="ruby-keyword kw">end</span></pre>
|
18
33
|
</body>
|
19
34
|
</html>
|
@@ -5,15 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>sample (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 83</span>
|
14
|
+
83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sample</span>(<span class="ruby-identifier">stat</span>,<span class="ruby-identifier">count</span>)
|
15
|
+
84: <span class="ruby-identifier">cur_run</span>[<span class="ruby-identifier">stat</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Sampler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">stat</span>)
|
16
|
+
85: <span class="ruby-identifier">cur_run</span>[<span class="ruby-identifier">stat</span>].<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">count</span>)
|
17
|
+
86: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -5,22 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>count (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
101:
|
19
|
-
102: <span class="ruby-ivar">@runs</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">run</span><span class="ruby-operator">|</span>
|
20
|
-
103: <span class="ruby-ivar">@runs</span>[<span class="ruby-identifier">run</span>].<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">stats</span><span class="ruby-operator">|</span> <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">run</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">stats</span>.<span class="ruby-identifier">values</span> }
|
21
|
-
104: <span class="ruby-keyword kw">end</span>
|
22
|
-
105:
|
23
|
-
106: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
24
|
-
107: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 89</span>
|
14
|
+
89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>(<span class="ruby-identifier">stat</span>,<span class="ruby-identifier">count</span>=<span class="ruby-value">1</span>)
|
15
|
+
90: <span class="ruby-identifier">cur_count</span>[<span class="ruby-identifier">stat</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
|
16
|
+
91: <span class="ruby-identifier">cur_count</span>[<span class="ruby-identifier">stat</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">count</span>
|
17
|
+
92: <span class="ruby-keyword kw">end</span></pre>
|
25
18
|
</body>
|
26
19
|
</html>
|
@@ -5,25 +5,22 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>runs_to_a (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
122:
|
26
|
-
123: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
27
|
-
124: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 97</span>
|
14
|
+
97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">runs_to_a</span>(<span class="ruby-identifier">headers</span>=<span class="ruby-keyword kw">false</span>)
|
15
|
+
98: <span class="ruby-identifier">keys</span> = [<span class="ruby-value str">"run"</span>] <span class="ruby-operator">+</span> <span class="ruby-constant">Sampler</span>.<span class="ruby-identifier">keys</span>
|
16
|
+
99: <span class="ruby-identifier">results</span> = []
|
17
|
+
100: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">keys</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">headers</span>
|
18
|
+
101:
|
19
|
+
102: <span class="ruby-ivar">@runs</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">run</span><span class="ruby-operator">|</span>
|
20
|
+
103: <span class="ruby-ivar">@runs</span>[<span class="ruby-identifier">run</span>].<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">stats</span><span class="ruby-operator">|</span> <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">run</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">stats</span>.<span class="ruby-identifier">values</span> }
|
21
|
+
104: <span class="ruby-keyword kw">end</span>
|
22
|
+
105:
|
23
|
+
106: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
24
|
+
107: <span class="ruby-keyword kw">end</span></pre>
|
28
25
|
</body>
|
29
26
|
</html>
|
@@ -5,15 +5,25 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>counts_to_a (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 111</span>
|
14
|
+
111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">counts_to_a</span>(<span class="ruby-identifier">headers</span>=<span class="ruby-keyword kw">false</span>)
|
15
|
+
112: <span class="ruby-identifier">keys</span> = <span class="ruby-ivar">@counts</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">keys</span>
|
16
|
+
113: <span class="ruby-identifier">results</span> = []
|
17
|
+
114: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> [<span class="ruby-value str">"run"</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">keys</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">headers</span>
|
18
|
+
115:
|
19
|
+
116: <span class="ruby-ivar">@counts</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">run</span><span class="ruby-operator">|</span>
|
20
|
+
117: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">run</span>]
|
21
|
+
118: <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
22
|
+
119: <span class="ruby-identifier">results</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@counts</span>[<span class="ruby-identifier">run</span>][<span class="ruby-identifier">k</span>]
|
23
|
+
120: <span class="ruby-keyword kw">end</span>
|
24
|
+
121: <span class="ruby-keyword kw">end</span>
|
25
|
+
122:
|
26
|
+
123: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
27
|
+
124: <span class="ruby-keyword kw">end</span></pre>
|
18
28
|
</body>
|
19
29
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>track (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 130</span>
|
14
|
+
130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">track</span>(<span class="ruby-identifier">name</span>,<span class="ruby-identifier">value</span>)
|
15
|
+
131: <span class="ruby-ivar">@tracking</span>.<span class="ruby-identifier">last</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">||=</span> []
|
16
|
+
132: <span class="ruby-ivar">@tracking</span>.<span class="ruby-identifier">last</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">value</span>
|
17
|
+
133: <span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>write_runs (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 136</span>
|
14
|
+
136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_runs</span>(<span class="ruby-identifier">file</span>)
|
15
|
+
137: <span class="ruby-constant">CSV</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>,<span class="ruby-value str">"w"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">out</span><span class="ruby-operator">|</span> <span class="ruby-identifier">runs_to_a</span>(<span class="ruby-identifier">headers</span>=<span class="ruby-keyword kw">true</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span> } }
|
16
|
+
138: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,19 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>write_counts (RFuzz::Session)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
150: <span class="ruby-keyword kw">rescue</span>
|
18
|
-
151: <span class="ruby-identifier">count</span> <span class="ruby-identifier">as</span>
|
19
|
-
152: <span class="ruby-identifier">count</span> <span class="ruby-identifier">$!</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">":"</span>,<span class="ruby-value str">""</span>)
|
20
|
-
153: <span class="ruby-keyword kw">end</span>
|
21
|
-
154: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 141</span>
|
14
|
+
141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_counts</span>(<span class="ruby-identifier">file</span>)
|
15
|
+
142: <span class="ruby-constant">CSV</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>,<span class="ruby-value str">"w"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">out</span><span class="ruby-operator">|</span> <span class="ruby-identifier">counts_to_a</span>(<span class="ruby-identifier">headers</span>=<span class="ruby-keyword kw">true</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span> } }
|
16
|
+
143: <span class="ruby-keyword kw">end</span></pre>
|
22
17
|
</body>
|
23
18
|
</html>
|
@@ -0,0 +1,23 @@
|
|
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>count_errors (RFuzz::Session)</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/rfuzz/session.rb, line 147</span>
|
14
|
+
147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count_errors</span>(<span class="ruby-identifier">as</span>)
|
15
|
+
148: <span class="ruby-keyword kw">begin</span>
|
16
|
+
149: <span class="ruby-keyword kw">yield</span>
|
17
|
+
150: <span class="ruby-keyword kw">rescue</span>
|
18
|
+
151: <span class="ruby-identifier">count</span> <span class="ruby-identifier">as</span>
|
19
|
+
152: <span class="ruby-identifier">count</span> <span class="ruby-identifier">$!</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">":"</span>,<span class="ruby-value str">""</span>)
|
20
|
+
153: <span class="ruby-keyword kw">end</span>
|
21
|
+
154: <span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -83,11 +83,11 @@
|
|
83
83
|
When registered as the notifier for a client it tracks the times for each
|
84
84
|
part of the request. Rather than subclassing <a
|
85
85
|
href="Notifier.html">RFuzz::Notifier</a> it uses a <a
|
86
|
-
href="StatsTracker.html#
|
86
|
+
href="StatsTracker.html#M000070">method_missing</a> to record the even
|
87
87
|
timings.
|
88
88
|
</p>
|
89
89
|
<p>
|
90
|
-
You can dump it with <a href="StatsTracker.html#
|
90
|
+
You can dump it with <a href="StatsTracker.html#M000071">to_s</a>, or you
|
91
91
|
can access the StatsTracker.stats hash to read the <a
|
92
92
|
href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
93
93
|
</p>
|
@@ -101,12 +101,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
101
101
|
<h3 class="section-bar">Methods</h3>
|
102
102
|
|
103
103
|
<div class="name-list">
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
104
|
+
<a href="#M000067">mark</a>
|
105
|
+
<a href="#M000070">method_missing</a>
|
106
|
+
<a href="#M000066">new</a>
|
107
|
+
<a href="#M000069">reset</a>
|
108
|
+
<a href="#M000068">sample</a>
|
109
|
+
<a href="#M000071">to_s</a>
|
110
110
|
</div>
|
111
111
|
</div>
|
112
112
|
|
@@ -141,12 +141,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
141
141
|
<div id="methods">
|
142
142
|
<h3 class="section-bar">Public Class methods</h3>
|
143
143
|
|
144
|
-
<div id="method-
|
145
|
-
<a name="
|
144
|
+
<div id="method-M000066" class="method-detail">
|
145
|
+
<a name="M000066"></a>
|
146
146
|
|
147
147
|
<div class="method-heading">
|
148
|
-
<a href="StatsTracker.src/
|
149
|
-
onclick="popupCode('StatsTracker.src/
|
148
|
+
<a href="StatsTracker.src/M000066.html" target="Code" class="method-signature"
|
149
|
+
onclick="popupCode('StatsTracker.src/M000066.html');return false;">
|
150
150
|
<span class="method-name">new</span><span class="method-args">()</span>
|
151
151
|
</a>
|
152
152
|
</div>
|
@@ -157,12 +157,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
157
157
|
|
158
158
|
<h3 class="section-bar">Public Instance methods</h3>
|
159
159
|
|
160
|
-
<div id="method-
|
161
|
-
<a name="
|
160
|
+
<div id="method-M000067" class="method-detail">
|
161
|
+
<a name="M000067"></a>
|
162
162
|
|
163
163
|
<div class="method-heading">
|
164
|
-
<a href="StatsTracker.src/
|
165
|
-
onclick="popupCode('StatsTracker.src/
|
164
|
+
<a href="StatsTracker.src/M000067.html" target="Code" class="method-signature"
|
165
|
+
onclick="popupCode('StatsTracker.src/M000067.html');return false;">
|
166
166
|
<span class="method-name">mark</span><span class="method-args">(event)</span>
|
167
167
|
</a>
|
168
168
|
</div>
|
@@ -171,12 +171,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
171
171
|
</div>
|
172
172
|
</div>
|
173
173
|
|
174
|
-
<div id="method-
|
175
|
-
<a name="
|
174
|
+
<div id="method-M000070" class="method-detail">
|
175
|
+
<a name="M000070"></a>
|
176
176
|
|
177
177
|
<div class="method-heading">
|
178
|
-
<a href="StatsTracker.src/
|
179
|
-
onclick="popupCode('StatsTracker.src/
|
178
|
+
<a href="StatsTracker.src/M000070.html" target="Code" class="method-signature"
|
179
|
+
onclick="popupCode('StatsTracker.src/M000070.html');return false;">
|
180
180
|
<span class="method-name">method_missing</span><span class="method-args">(event, *args)</span>
|
181
181
|
</a>
|
182
182
|
</div>
|
@@ -185,12 +185,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
185
185
|
</div>
|
186
186
|
</div>
|
187
187
|
|
188
|
-
<div id="method-
|
189
|
-
<a name="
|
188
|
+
<div id="method-M000069" class="method-detail">
|
189
|
+
<a name="M000069"></a>
|
190
190
|
|
191
191
|
<div class="method-heading">
|
192
|
-
<a href="StatsTracker.src/
|
193
|
-
onclick="popupCode('StatsTracker.src/
|
192
|
+
<a href="StatsTracker.src/M000069.html" target="Code" class="method-signature"
|
193
|
+
onclick="popupCode('StatsTracker.src/M000069.html');return false;">
|
194
194
|
<span class="method-name">reset</span><span class="method-args">()</span>
|
195
195
|
</a>
|
196
196
|
</div>
|
@@ -199,12 +199,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
199
199
|
</div>
|
200
200
|
</div>
|
201
201
|
|
202
|
-
<div id="method-
|
203
|
-
<a name="
|
202
|
+
<div id="method-M000068" class="method-detail">
|
203
|
+
<a name="M000068"></a>
|
204
204
|
|
205
205
|
<div class="method-heading">
|
206
|
-
<a href="StatsTracker.src/
|
207
|
-
onclick="popupCode('StatsTracker.src/
|
206
|
+
<a href="StatsTracker.src/M000068.html" target="Code" class="method-signature"
|
207
|
+
onclick="popupCode('StatsTracker.src/M000068.html');return false;">
|
208
208
|
<span class="method-name">sample</span><span class="method-args">(event)</span>
|
209
209
|
</a>
|
210
210
|
</div>
|
@@ -213,12 +213,12 @@ href="Sampler.html">RFuzz::Sampler</a> objects related to each event.
|
|
213
213
|
</div>
|
214
214
|
</div>
|
215
215
|
|
216
|
-
<div id="method-
|
217
|
-
<a name="
|
216
|
+
<div id="method-M000071" class="method-detail">
|
217
|
+
<a name="M000071"></a>
|
218
218
|
|
219
219
|
<div class="method-heading">
|
220
|
-
<a href="StatsTracker.src/
|
221
|
-
onclick="popupCode('StatsTracker.src/
|
220
|
+
<a href="StatsTracker.src/M000071.html" target="Code" class="method-signature"
|
221
|
+
onclick="popupCode('StatsTracker.src/M000071.html');return false;">
|
222
222
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
223
223
|
</a>
|
224
224
|
</div>
|