rfuzz 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/README +18 -17
  2. data/Rakefile +8 -3
  3. data/doc/rdoc/classes/RFuzz/Browser.html +229 -0
  4. data/doc/rdoc/classes/RFuzz/Browser.src/M000068.html +25 -0
  5. data/doc/rdoc/classes/RFuzz/Browser.src/M000069.html +23 -0
  6. data/doc/rdoc/classes/RFuzz/Browser.src/M000070.html +24 -0
  7. data/doc/rdoc/classes/RFuzz/HttpClient.html +10 -0
  8. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000010.html +10 -10
  9. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000011.html +18 -18
  10. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000012.html +36 -35
  11. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000013.html +35 -35
  12. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000014.html +43 -43
  13. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000015.html +22 -22
  14. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000016.html +12 -12
  15. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000017.html +18 -18
  16. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000018.html +4 -4
  17. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +12 -12
  18. data/doc/rdoc/classes/RFuzz/HttpEncoding.html +13 -0
  19. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html +12 -12
  20. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000002.html +4 -4
  21. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000003.html +12 -12
  22. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000004.html +4 -4
  23. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html +18 -18
  24. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html +4 -4
  25. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html +6 -6
  26. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html +6 -6
  27. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html +18 -18
  28. data/doc/rdoc/classes/RFuzz/Notifier.src/M000044.html +3 -3
  29. data/doc/rdoc/classes/RFuzz/Notifier.src/M000045.html +3 -3
  30. data/doc/rdoc/classes/RFuzz/Notifier.src/M000046.html +3 -3
  31. data/doc/rdoc/classes/RFuzz/Notifier.src/M000047.html +3 -3
  32. data/doc/rdoc/classes/RFuzz/Notifier.src/M000048.html +3 -3
  33. data/doc/rdoc/classes/RFuzz/Notifier.src/M000049.html +3 -3
  34. data/doc/rdoc/classes/RFuzz/Session.html +11 -1
  35. data/doc/rdoc/classes/RFuzz/Session.src/M000020.html +16 -16
  36. data/doc/rdoc/classes/RFuzz/Session.src/M000021.html +4 -4
  37. data/doc/rdoc/classes/RFuzz/Session.src/M000022.html +4 -4
  38. data/doc/rdoc/classes/RFuzz/Session.src/M000023.html +20 -20
  39. data/doc/rdoc/classes/RFuzz/Session.src/M000024.html +5 -5
  40. data/doc/rdoc/classes/RFuzz/Session.src/M000025.html +5 -5
  41. data/doc/rdoc/classes/RFuzz/Session.src/M000026.html +12 -12
  42. data/doc/rdoc/classes/RFuzz/Session.src/M000027.html +15 -15
  43. data/doc/rdoc/classes/RFuzz/Session.src/M000028.html +5 -5
  44. data/doc/rdoc/classes/RFuzz/Session.src/M000029.html +4 -4
  45. data/doc/rdoc/classes/RFuzz/Session.src/M000030.html +4 -4
  46. data/doc/rdoc/classes/RFuzz/Session.src/M000031.html +9 -9
  47. data/doc/rdoc/classes/RFuzz.html +5 -0
  48. data/doc/rdoc/created.rid +1 -1
  49. data/doc/rdoc/files/COPYING.html +1 -1
  50. data/doc/rdoc/files/LICENSE.html +1 -1
  51. data/doc/rdoc/files/README.html +23 -24
  52. data/doc/rdoc/files/lib/rfuzz/browser_rb.html +109 -0
  53. data/doc/rdoc/files/lib/rfuzz/client_rb.html +2 -1
  54. data/doc/rdoc/files/lib/rfuzz/random_rb.html +1 -1
  55. data/doc/rdoc/files/lib/rfuzz/rfuzz_rb.html +1 -1
  56. data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
  57. data/doc/rdoc/files/lib/rfuzz/stats_rb.html +1 -1
  58. data/doc/rdoc/fr_class_index.html +1 -0
  59. data/doc/rdoc/fr_file_index.html +1 -0
  60. data/doc/rdoc/fr_method_index.html +9 -6
  61. data/examples/cl_watcher.rb +36 -0
  62. data/examples/mongrel_test_suite/test/http/access_authentication.rb +8 -0
  63. data/examples/mongrel_test_suite/test/http/appendix.rb +76 -0
  64. data/examples/mongrel_test_suite/test/http/base_protocol.rb +4 -7
  65. data/examples/mongrel_test_suite/test/http/caching_in_http.rb +140 -0
  66. data/examples/mongrel_test_suite/test/http/connections.rb +48 -0
  67. data/examples/mongrel_test_suite/test/http/content_negotiation.rb +20 -0
  68. data/examples/mongrel_test_suite/test/http/entity.rb +24 -0
  69. data/examples/mongrel_test_suite/test/http/header_field_definitions.rb +231 -0
  70. data/examples/mongrel_test_suite/test/http/http_message.rb +122 -0
  71. data/examples/mongrel_test_suite/test/http/method_definitions.rb +52 -0
  72. data/examples/mongrel_test_suite/test/http/protocol_parameters.rb +286 -0
  73. data/examples/mongrel_test_suite/test/http/request.rb +28 -0
  74. data/examples/mongrel_test_suite/test/http/response.rb +20 -0
  75. data/examples/mongrel_test_suite/test/http/security_considerations.rb +54 -0
  76. data/examples/mongrel_test_suite/test/http/status_code_definitions.rb +192 -0
  77. data/ext/fuzzrnd/fuzzrnd.c +1 -2
  78. data/lib/rfuzz/browser.rb +53 -0
  79. data/lib/rfuzz/client.rb +11 -6
  80. data/lib/rfuzz/session.rb +3 -1
  81. data/tools/rakehelp.rb +4 -2
  82. metadata +24 -15
  83. data/test/coverage/index.html +0 -388
  84. data/test/coverage/lib-rfuzz-client_rb.html +0 -1127
  85. data/test/coverage/lib-rfuzz-random_rb.html +0 -739
  86. data/test/coverage/lib-rfuzz-session_rb.html +0 -783
  87. data/test/coverage/lib-rfuzz-stats_rb.html +0 -788
  88. data/test/server.rb +0 -101
  89. data/test/test_client.rb +0 -164
  90. data/test/test_fuzzrnd.rb +0 -31
  91. data/test/test_httpparser.rb +0 -48
  92. data/test/test_random.rb +0 -75
  93. data/test/test_session.rb +0 -33
  94. data/test/test_stats.rb +0 -45
@@ -10,23 +10,23 @@
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/client.rb, line 83</span>
14
- 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_query</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">query</span>)
15
- 84: <span class="ruby-identifier">params</span> = []
16
- 85:
17
- 86: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>
18
- 87: <span class="ruby-identifier">query</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-identifier">v</span><span class="ruby-operator">|</span>
19
- 88: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
20
- 89: <span class="ruby-identifier">v</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">params</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">x</span>) }
21
- 90: <span class="ruby-keyword kw">else</span>
22
- 91: <span class="ruby-identifier">params</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
23
- 92: <span class="ruby-keyword kw">end</span>
24
- 93: <span class="ruby-keyword kw">end</span>
25
- 94:
26
- 95: <span class="ruby-identifier">uri</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;?&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'&amp;'</span>)
27
- 96: <span class="ruby-keyword kw">end</span>
28
- 97:
29
- 98: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uri</span>
30
- 99: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 85</span>
14
+ 85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_query</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">query</span>)
15
+ 86: <span class="ruby-identifier">params</span> = []
16
+ 87:
17
+ 88: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>
18
+ 89: <span class="ruby-identifier">query</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-identifier">v</span><span class="ruby-operator">|</span>
19
+ 90: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
20
+ 91: <span class="ruby-identifier">v</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">params</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">x</span>) }
21
+ 92: <span class="ruby-keyword kw">else</span>
22
+ 93: <span class="ruby-identifier">params</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
23
+ 94: <span class="ruby-keyword kw">end</span>
24
+ 95: <span class="ruby-keyword kw">end</span>
25
+ 96:
26
+ 97: <span class="ruby-identifier">uri</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;?&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'&amp;'</span>)
27
+ 98: <span class="ruby-keyword kw">end</span>
28
+ 99:
29
+ 100: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uri</span>
30
+ 101: <span class="ruby-keyword kw">end</span></pre>
31
31
  </body>
32
32
  </html>
@@ -10,9 +10,9 @@
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/client.rb, line 104</span>
14
- 104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_host</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>)
15
- 105: <span class="ruby-node">&quot;#{host}&quot;</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">80</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;:#{port}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;&quot;</span>)
16
- 106: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 106</span>
14
+ 106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_host</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>)
15
+ 107: <span class="ruby-node">&quot;#{host}&quot;</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">80</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;:#{port}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;&quot;</span>)
16
+ 108: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,11 +10,11 @@
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/client.rb, line 111</span>
14
- 111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">s</span>)
15
- 112: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/([^ a-zA-Z0-9_.-]+)/n</span>) {
16
- 113: <span class="ruby-value str">'%'</span><span class="ruby-operator">+</span><span class="ruby-identifier">$1</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'H2'</span><span class="ruby-operator">*</span><span class="ruby-identifier">$1</span>.<span class="ruby-identifier">size</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">'%'</span>).<span class="ruby-identifier">upcase</span>
17
- 114: }.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">' '</span>, <span class="ruby-value str">'+'</span>)
18
- 115: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 113</span>
14
+ 113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">s</span>)
15
+ 114: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/([^ a-zA-Z0-9_.-]+)/n</span>) {
16
+ 115: <span class="ruby-value str">'%'</span><span class="ruby-operator">+</span><span class="ruby-identifier">$1</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'H2'</span><span class="ruby-operator">*</span><span class="ruby-identifier">$1</span>.<span class="ruby-identifier">size</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">'%'</span>).<span class="ruby-identifier">upcase</span>
17
+ 116: }.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">' '</span>, <span class="ruby-value str">'+'</span>)
18
+ 117: <span class="ruby-keyword kw">end</span></pre>
19
19
  </body>
20
20
  </html>
@@ -10,11 +10,11 @@
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/client.rb, line 119</span>
14
- 119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">s</span>)
15
- 120: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">'+'</span>, <span class="ruby-value str">' '</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/((?:%[0-9a-fA-F]{2})+)/n</span>){
16
- 121: [<span class="ruby-identifier">$1</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'%'</span>)].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'H*'</span>)
17
- 122: }
18
- 123: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 121</span>
14
+ 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">s</span>)
15
+ 122: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">'+'</span>, <span class="ruby-value str">' '</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/((?:%[0-9a-fA-F]{2})+)/n</span>){
16
+ 123: [<span class="ruby-identifier">$1</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'%'</span>)].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'H*'</span>)
17
+ 124: }
18
+ 125: <span class="ruby-keyword kw">end</span></pre>
19
19
  </body>
20
20
  </html>
@@ -10,23 +10,23 @@
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/client.rb, line 129</span>
14
- 129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_parse</span>(<span class="ruby-identifier">qs</span>, <span class="ruby-identifier">d</span> = <span class="ruby-value str">'&amp;;'</span>)
15
- 130: <span class="ruby-identifier">params</span> = {}
16
- 131: (<span class="ruby-identifier">qs</span><span class="ruby-operator">||</span><span class="ruby-value str">''</span>).<span class="ruby-identifier">split</span>(<span class="ruby-node">/[#{d}] */n</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">params</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
17
- 132: <span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>=<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">p</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">'='</span>,<span class="ruby-value">2</span>)
18
- 133: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cur</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>]
19
- 134: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cur</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
20
- 135: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">v</span>
21
- 136: <span class="ruby-keyword kw">else</span>
22
- 137: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>] = [<span class="ruby-identifier">cur</span>, <span class="ruby-identifier">v</span>]
23
- 138: <span class="ruby-keyword kw">end</span>
24
- 139: <span class="ruby-keyword kw">else</span>
25
- 140: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
26
- 141: <span class="ruby-keyword kw">end</span>
27
- 142: }
28
- 143:
29
- 144: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">params</span>
30
- 145: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 131</span>
14
+ 131: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_parse</span>(<span class="ruby-identifier">qs</span>, <span class="ruby-identifier">d</span> = <span class="ruby-value str">'&amp;;'</span>)
15
+ 132: <span class="ruby-identifier">params</span> = {}
16
+ 133: (<span class="ruby-identifier">qs</span><span class="ruby-operator">||</span><span class="ruby-value str">''</span>).<span class="ruby-identifier">split</span>(<span class="ruby-node">/[#{d}] */n</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">params</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
17
+ 134: <span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>=<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">p</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">'='</span>,<span class="ruby-value">2</span>)
18
+ 135: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cur</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>]
19
+ 136: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cur</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
20
+ 137: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">v</span>
21
+ 138: <span class="ruby-keyword kw">else</span>
22
+ 139: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>] = [<span class="ruby-identifier">cur</span>, <span class="ruby-identifier">v</span>]
23
+ 140: <span class="ruby-keyword kw">end</span>
24
+ 141: <span class="ruby-keyword kw">else</span>
25
+ 142: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
26
+ 143: <span class="ruby-keyword kw">end</span>
27
+ 144: }
28
+ 145:
29
+ 146: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">params</span>
30
+ 147: <span class="ruby-keyword kw">end</span></pre>
31
31
  </body>
32
32
  </html>
@@ -10,8 +10,8 @@
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/client.rb, line 471</span>
14
- 471: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect</span>(<span class="ruby-identifier">state</span>)
15
- 472: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 476</span>
14
+ 476: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect</span>(<span class="ruby-identifier">state</span>)
15
+ 477: <span class="ruby-keyword kw">end</span></pre>
16
16
  </body>
17
17
  </html>
@@ -10,8 +10,8 @@
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/client.rb, line 477</span>
14
- 477: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">state</span>)
15
- 478: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 482</span>
14
+ 482: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">state</span>)
15
+ 483: <span class="ruby-keyword kw">end</span></pre>
16
16
  </body>
17
17
  </html>
@@ -10,8 +10,8 @@
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/client.rb, line 483</span>
14
- 483: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">state</span>)
15
- 484: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 488</span>
14
+ 488: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">state</span>)
15
+ 489: <span class="ruby-keyword kw">end</span></pre>
16
16
  </body>
17
17
  </html>
@@ -10,8 +10,8 @@
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/client.rb, line 487</span>
14
- 487: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_header</span>(<span class="ruby-identifier">state</span>)
15
- 488: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 492</span>
14
+ 492: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_header</span>(<span class="ruby-identifier">state</span>)
15
+ 493: <span class="ruby-keyword kw">end</span></pre>
16
16
  </body>
17
17
  </html>
@@ -10,8 +10,8 @@
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/client.rb, line 491</span>
14
- 491: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_body</span>(<span class="ruby-identifier">state</span>)
15
- 492: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 496</span>
14
+ 496: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_body</span>(<span class="ruby-identifier">state</span>)
15
+ 497: <span class="ruby-keyword kw">end</span></pre>
16
16
  </body>
17
17
  </html>
@@ -10,8 +10,8 @@
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/client.rb, line 495</span>
14
- 495: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>(<span class="ruby-identifier">state</span>)
15
- 496: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 500</span>
14
+ 500: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>(<span class="ruby-identifier">state</span>)
15
+ 501: <span class="ruby-keyword kw">end</span></pre>
16
16
  </body>
17
17
  </html>
@@ -126,11 +126,21 @@ activity.
126
126
 
127
127
  <div class="name-list">
128
128
  <table>
129
+ <tr class="top-aligned-row context-row">
130
+ <td class="context-item-name">client</td>
131
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
132
+ <td class="context-item-desc"></td>
133
+ </tr>
129
134
  <tr class="top-aligned-row context-row">
130
135
  <td class="context-item-name">counts</td>
131
136
  <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
132
137
  <td class="context-item-desc"></td>
133
138
  </tr>
139
+ <tr class="top-aligned-row context-row">
140
+ <td class="context-item-name">rand</td>
141
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
142
+ <td class="context-item-desc"></td>
143
+ </tr>
134
144
  <tr class="top-aligned-row context-row">
135
145
  <td class="context-item-name">runs</td>
136
146
  <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
@@ -280,7 +290,7 @@ output. Use Session#counts to access the counts directly.
280
290
  <div class="method-heading">
281
291
  <a href="Session.src/M000023.html" target="Code" class="method-signature"
282
292
  onclick="popupCode('Session.src/M000023.html');return false;">
283
- <span class="method-name">run</span><span class="method-args">(count, options={}) {|@client, @rand| ...}</span>
293
+ <span class="method-name">run</span><span class="method-args">(count=1, options={}) {|@client, @rand| ...}</span>
284
294
  </a>
285
295
  </div>
286
296
 
@@ -10,22 +10,22 @@
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 26</span>
14
- 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
15
- 27: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:host</span>]
16
- 28: <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:port</span>]
17
- 29: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:host</span>)
18
- 30: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:port</span>)
19
- 31: <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
- 32:
21
- 33: <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">&quot;..&quot;</span>, <span class="ruby-value str">&quot;..&quot;</span>, <span class="ruby-value str">&quot;resources&quot;</span>,<span class="ruby-value str">&quot;words.txt&quot;</span>)
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>
22
20
  34:
23
- 35: <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
- 36: <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">&quot;\n&quot;</span>))
25
- 37:
26
- 38: <span class="ruby-ivar">@runs</span> = []
27
- 39: <span class="ruby-ivar">@counts</span> = []
28
- 40: <span class="ruby-ivar">@tracking</span> = []
29
- 41: <span class="ruby-keyword kw">end</span></pre>
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">&quot;..&quot;</span>, <span class="ruby-value str">&quot;..&quot;</span>, <span class="ruby-value str">&quot;resources&quot;</span>,<span class="ruby-value str">&quot;words.txt&quot;</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">&quot;\n&quot;</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>
30
30
  </body>
31
31
  </html>
@@ -10,9 +10,9 @@
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 43</span>
14
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cur_run</span>
15
- 44: <span class="ruby-ivar">@runs</span>.<span class="ruby-identifier">last</span>
16
- 45: <span class="ruby-keyword kw">end</span></pre>
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>
@@ -10,9 +10,9 @@
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 47</span>
14
- 47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cur_count</span>
15
- 48: <span class="ruby-ivar">@counts</span>.<span class="ruby-identifier">last</span>
16
- 49: <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>
17
17
  </body>
18
18
  </html>
@@ -10,25 +10,25 @@
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 59</span>
14
- 59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">count</span>, <span class="ruby-identifier">options</span>={})
15
- 60: <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
- 61: <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
- 62: <span class="ruby-comment cmt"># setup for this latest sample run</span>
18
- 63: <span class="ruby-ivar">@runs</span> <span class="ruby-operator">&lt;&lt;</span> {}
19
- 64: <span class="ruby-ivar">@counts</span> <span class="ruby-operator">&lt;&lt;</span> {}
20
- 65: <span class="ruby-ivar">@tracking</span> <span class="ruby-operator">&lt;&lt;</span> {}
21
- 66: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@client</span>, <span class="ruby-ivar">@rand</span>
22
- 67:
23
- 68: <span class="ruby-comment cmt"># record the request stats then reset them</span>
24
- 69: <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
- 70: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">reset</span>
26
- 71: <span class="ruby-keyword kw">end</span>
27
- 72:
28
- 73: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>]
29
- 74: <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
- 75: <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
- 76: <span class="ruby-keyword kw">end</span>
32
- 77: <span class="ruby-keyword kw">end</span></pre>
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">&lt;&lt;</span> {}
19
+ 66: <span class="ruby-ivar">@counts</span> <span class="ruby-operator">&lt;&lt;</span> {}
20
+ 67: <span class="ruby-ivar">@tracking</span> <span class="ruby-operator">&lt;&lt;</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>
33
33
  </body>
34
34
  </html>
@@ -10,10 +10,10 @@
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 81</span>
14
- 81: <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
- 82: <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
- 83: <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
- 84: <span class="ruby-keyword kw">end</span></pre>
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>
@@ -10,10 +10,10 @@
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 87</span>
14
- 87: <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
- 88: <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
- 89: <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
- 90: <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>
18
18
  </body>
19
19
  </html>
@@ -10,17 +10,17 @@
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 95</span>
14
- 95: <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
- 96: <span class="ruby-identifier">keys</span> = [<span class="ruby-value str">&quot;run&quot;</span>] <span class="ruby-operator">+</span> <span class="ruby-constant">Sampler</span>.<span class="ruby-identifier">keys</span>
16
- 97: <span class="ruby-identifier">results</span> = []
17
- 98: <span class="ruby-identifier">results</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">keys</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">headers</span>
18
- 99:
19
- 100: <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
- 101: <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">&lt;&lt;</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
- 102: <span class="ruby-keyword kw">end</span>
22
- 103:
23
- 104: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
24
- 105: <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">&quot;run&quot;</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">&lt;&lt;</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">&lt;&lt;</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>
25
25
  </body>
26
26
  </html>
@@ -10,20 +10,20 @@
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 109</span>
14
- 109: <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
- 110: <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
- 111: <span class="ruby-identifier">results</span> = []
17
- 112: <span class="ruby-identifier">results</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-value str">&quot;run&quot;</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
- 113:
19
- 114: <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
- 115: <span class="ruby-identifier">results</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">run</span>]
21
- 116: <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
- 117: <span class="ruby-identifier">results</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@counts</span>[<span class="ruby-identifier">run</span>][<span class="ruby-identifier">k</span>]
23
- 118: <span class="ruby-keyword kw">end</span>
24
- 119: <span class="ruby-keyword kw">end</span>
25
- 120:
26
- 121: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
27
- 122: <span class="ruby-keyword kw">end</span></pre>
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">&lt;&lt;</span> [<span class="ruby-value str">&quot;run&quot;</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">&lt;&lt;</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">&lt;&lt;</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>
28
28
  </body>
29
29
  </html>
@@ -10,10 +10,10 @@
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 128</span>
14
- 128: <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
- 129: <span class="ruby-ivar">@tracking</span>.<span class="ruby-identifier">last</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">||=</span> []
16
- 130: <span class="ruby-ivar">@tracking</span>.<span class="ruby-identifier">last</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">value</span>
17
- 131: <span class="ruby-keyword kw">end</span></pre>
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">&lt;&lt;</span> <span class="ruby-identifier">value</span>
17
+ 133: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>