rfuzz 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +55 -0
- data/LICENSE +55 -0
- data/README +252 -0
- data/Rakefile +48 -0
- data/doc/rdoc/classes/RFuzz.html +146 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +481 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000010.html +24 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000011.html +34 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000012.html +49 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000013.html +49 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000014.html +57 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000015.html +37 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000016.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000017.html +34 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000018.html +18 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.html +294 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000002.html +18 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000003.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000004.html +18 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html +32 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html +18 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html +20 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html +20 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html +32 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.html +180 -0
- data/doc/rdoc/classes/RFuzz/Notifier.html +252 -0
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000044.html +17 -0
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000045.html +17 -0
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000046.html +17 -0
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000047.html +17 -0
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000048.html +17 -0
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000049.html +17 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.html +362 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000032.html +21 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000033.html +23 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000036.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000037.html +20 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000038.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000039.html +20 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000040.html +18 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000041.html +18 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000042.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000043.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.html +383 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000056.html +19 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000057.html +23 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000058.html +26 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000059.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000060.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000061.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000062.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000063.html +19 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000064.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000065.html +23 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000066.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000067.html +20 -0
- data/doc/rdoc/classes/RFuzz/Session.html +415 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000020.html +31 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000021.html +18 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000022.html +18 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000023.html +34 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000024.html +19 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000025.html +19 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000026.html +26 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000027.html +29 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000028.html +19 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000029.html +18 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000030.html +18 -0
- data/doc/rdoc/classes/RFuzz/Session.src/M000031.html +23 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.html +242 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000050.html +19 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000051.html +19 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000052.html +18 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000053.html +18 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000054.html +28 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000055.html +18 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +168 -0
- data/doc/rdoc/files/LICENSE.html +168 -0
- data/doc/rdoc/files/README.html +473 -0
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +111 -0
- data/doc/rdoc/files/lib/rfuzz/random_rb.html +116 -0
- data/doc/rdoc/files/lib/rfuzz/rfuzz_rb.html +109 -0
- data/doc/rdoc/files/lib/rfuzz/session_rb.html +111 -0
- data/doc/rdoc/files/lib/rfuzz/stats_rb.html +113 -0
- data/doc/rdoc/fr_class_index.html +35 -0
- data/doc/rdoc/fr_file_index.html +34 -0
- data/doc/rdoc/fr_method_index.html +93 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/examples/amazon_headers.rb +38 -0
- data/examples/hpricot_pudding.rb +22 -0
- data/examples/kill_routes.rb +26 -0
- data/examples/mongrel_test_suite/lib/gen.rb +24 -0
- data/examples/mongrel_test_suite/test/camping/static_files.rb +9 -0
- data/examples/mongrel_test_suite/test/camping/upload_file.rb +9 -0
- data/examples/mongrel_test_suite/test/camping/upload_progress.rb +9 -0
- data/examples/mongrel_test_suite/test/http/base_protocol.rb +23 -0
- data/examples/mongrel_test_suite/test/nitro/upload_file.rb +9 -0
- data/examples/mongrel_test_suite/test/nitro/upload_progress.rb +9 -0
- data/examples/mongrel_test_suite/test/rails/static_files.rb +9 -0
- data/examples/mongrel_test_suite/test/rails/upload_file.rb +9 -0
- data/examples/mongrel_test_suite/test/rails/upload_progress.rb +9 -0
- data/examples/perftest.rb +30 -0
- data/ext/fuzzrnd/ext_help.h +14 -0
- data/ext/fuzzrnd/extconf.rb +6 -0
- data/ext/fuzzrnd/fuzzrnd.c +149 -0
- data/ext/http11_client/ext_help.h +14 -0
- data/ext/http11_client/extconf.rb +6 -0
- data/ext/http11_client/http11_client.c +288 -0
- data/ext/http11_client/http11_parser.c +629 -0
- data/ext/http11_client/http11_parser.h +46 -0
- data/ext/http11_client/http11_parser.rl +169 -0
- data/lib/rfuzz/client.rb +498 -0
- data/lib/rfuzz/random.rb +110 -0
- data/lib/rfuzz/rfuzz.rb +12 -0
- data/lib/rfuzz/session.rb +154 -0
- data/lib/rfuzz/stats.rb +159 -0
- data/resources/defaults.yaml +2 -0
- data/resources/words.txt +3310 -0
- data/test/coverage/index.html +388 -0
- data/test/coverage/lib-rfuzz-client_rb.html +1127 -0
- data/test/coverage/lib-rfuzz-random_rb.html +739 -0
- data/test/coverage/lib-rfuzz-session_rb.html +783 -0
- data/test/coverage/lib-rfuzz-stats_rb.html +788 -0
- data/test/server.rb +101 -0
- data/test/test_client.rb +164 -0
- data/test/test_fuzzrnd.rb +31 -0
- data/test/test_httpparser.rb +48 -0
- data/test/test_random.rb +75 -0
- data/test/test_session.rb +33 -0
- data/test/test_stats.rb +45 -0
- data/tools/rakehelp.rb +119 -0
- metadata +201 -0
|
@@ -0,0 +1,19 @@
|
|
|
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 (RFuzz::Sampler)</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/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>
|
|
@@ -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>reset (RFuzz::Sampler)</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/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>
|
|
@@ -0,0 +1,26 @@
|
|
|
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 (RFuzz::Sampler)</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/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>
|
|
@@ -0,0 +1,18 @@
|
|
|
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 (RFuzz::Sampler)</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/stats.rb, line 48</span>
|
|
14
|
+
48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">msg</span> = <span class="ruby-value str">""</span>, <span class="ruby-identifier">out</span>=<span class="ruby-constant">STDERR</span>)
|
|
15
|
+
49: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{msg}: #{self.to_s}"</span>
|
|
16
|
+
50: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
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>to_s (RFuzz::Sampler)</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/stats.rb, line 53</span>
|
|
14
|
+
53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
|
15
|
+
54: <span class="ruby-value str">"[%s]: SUM=%0.6f, SUMSQ=%0.6f, N=%0.6f, MEAN=%0.6f, SD=%0.6f, MIN=%0.6f, MAX=%0.6f"</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">values</span>
|
|
16
|
+
55: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
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>values (RFuzz::Sampler)</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/stats.rb, line 58</span>
|
|
14
|
+
58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">values</span>
|
|
15
|
+
59: [<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@sum</span>, <span class="ruby-ivar">@sumsq</span>, <span class="ruby-ivar">@n</span>, <span class="ruby-identifier">mean</span>, <span class="ruby-identifier">sd</span>, <span class="ruby-ivar">@min</span>, <span class="ruby-ivar">@max</span>]
|
|
16
|
+
60: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
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>keys (RFuzz::Sampler)</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/stats.rb, line 64</span>
|
|
14
|
+
64: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>
|
|
15
|
+
65: [<span class="ruby-value str">"name"</span>,<span class="ruby-value str">"sum"</span>,<span class="ruby-value str">"sumsq"</span>,<span class="ruby-value str">"n"</span>,<span class="ruby-value str">"mean"</span>,<span class="ruby-value str">"sd"</span>,<span class="ruby-value str">"min"</span>,<span class="ruby-value str">"max"</span>]
|
|
16
|
+
66: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
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>to_hash (RFuzz::Sampler)</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/stats.rb, line 68</span>
|
|
14
|
+
68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hash</span>
|
|
15
|
+
69: {<span class="ruby-value str">"name"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>, <span class="ruby-value str">"sum"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@sum</span>, <span class="ruby-value str">"sumsq"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@sumsq</span>, <span class="ruby-value str">"mean"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">mean</span>,
|
|
16
|
+
70: <span class="ruby-value str">"sd"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sd</span>, <span class="ruby-value str">"min"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@min</span>, <span class="ruby-value str">"max"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@max</span>}
|
|
17
|
+
71: <span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
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>mean (RFuzz::Sampler)</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/stats.rb, line 74</span>
|
|
14
|
+
74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mean</span>
|
|
15
|
+
75: <span class="ruby-ivar">@sum</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@n</span>
|
|
16
|
+
76: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
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>sd (RFuzz::Sampler)</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/stats.rb, line 79</span>
|
|
14
|
+
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sd</span>
|
|
15
|
+
80: <span class="ruby-comment cmt"># (sqrt( ((s).sumsq - ( (s).sum * (s).sum / (s).n)) / ((s).n-1) ))</span>
|
|
16
|
+
81: <span class="ruby-keyword kw">begin</span>
|
|
17
|
+
82: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Math</span>.<span class="ruby-identifier">sqrt</span>( (<span class="ruby-ivar">@sumsq</span> <span class="ruby-operator">-</span> ( <span class="ruby-ivar">@sum</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@sum</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@n</span>)) <span class="ruby-operator">/</span> (<span class="ruby-ivar">@n</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) )
|
|
18
|
+
83: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EDOM</span>
|
|
19
|
+
84: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
|
20
|
+
85: <span class="ruby-keyword kw">end</span>
|
|
21
|
+
86: <span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
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>mark (RFuzz::Sampler)</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/stats.rb, line 94</span>
|
|
14
|
+
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mark</span>
|
|
15
|
+
95: <span class="ruby-ivar">@last_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
|
16
|
+
96: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
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>tick (RFuzz::Sampler)</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/stats.rb, line 107</span>
|
|
14
|
+
107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tick</span>
|
|
15
|
+
108: <span class="ruby-identifier">now</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
|
16
|
+
109: <span class="ruby-identifier">sample</span>(<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@last_time</span>)
|
|
17
|
+
110: <span class="ruby-ivar">@last_time</span> = <span class="ruby-identifier">now</span>
|
|
18
|
+
111: <span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,415 @@
|
|
|
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: RFuzz::Session</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">RFuzz::Session</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/rfuzz/session_rb.html">
|
|
59
|
+
lib/rfuzz/session.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
|
+
<div id="description">
|
|
82
|
+
<p>
|
|
83
|
+
Creates a small light DSL for running <a href="../RFuzz.html">RFuzz</a>
|
|
84
|
+
sessions against a web server. It configures a basic client and randomizer
|
|
85
|
+
that you then use to conduct sessions and record statistics about the
|
|
86
|
+
activity.
|
|
87
|
+
</p>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div id="method-list">
|
|
95
|
+
<h3 class="section-bar">Methods</h3>
|
|
96
|
+
|
|
97
|
+
<div class="name-list">
|
|
98
|
+
<a href="#M000025">count</a>
|
|
99
|
+
<a href="#M000031">count_errors</a>
|
|
100
|
+
<a href="#M000027">counts_to_a</a>
|
|
101
|
+
<a href="#M000022">cur_count</a>
|
|
102
|
+
<a href="#M000021">cur_run</a>
|
|
103
|
+
<a href="#M000020">new</a>
|
|
104
|
+
<a href="#M000023">run</a>
|
|
105
|
+
<a href="#M000026">runs_to_a</a>
|
|
106
|
+
<a href="#M000024">sample</a>
|
|
107
|
+
<a href="#M000028">track</a>
|
|
108
|
+
<a href="#M000030">write_counts</a>
|
|
109
|
+
<a href="#M000029">write_runs</a>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<!-- if includes -->
|
|
117
|
+
|
|
118
|
+
<div id="section">
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<div id="attribute-list">
|
|
125
|
+
<h3 class="section-bar">Attributes</h3>
|
|
126
|
+
|
|
127
|
+
<div class="name-list">
|
|
128
|
+
<table>
|
|
129
|
+
<tr class="top-aligned-row context-row">
|
|
130
|
+
<td class="context-item-name">counts</td>
|
|
131
|
+
<td class="context-item-value"> [RW] </td>
|
|
132
|
+
<td class="context-item-desc"></td>
|
|
133
|
+
</tr>
|
|
134
|
+
<tr class="top-aligned-row context-row">
|
|
135
|
+
<td class="context-item-name">runs</td>
|
|
136
|
+
<td class="context-item-value"> [RW] </td>
|
|
137
|
+
<td class="context-item-desc"></td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr class="top-aligned-row context-row">
|
|
140
|
+
<td class="context-item-name">tracking</td>
|
|
141
|
+
<td class="context-item-value"> [RW] </td>
|
|
142
|
+
<td class="context-item-desc"></td>
|
|
143
|
+
</tr>
|
|
144
|
+
</table>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<!-- if method_list -->
|
|
151
|
+
<div id="methods">
|
|
152
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
153
|
+
|
|
154
|
+
<div id="method-M000020" class="method-detail">
|
|
155
|
+
<a name="M000020"></a>
|
|
156
|
+
|
|
157
|
+
<div class="method-heading">
|
|
158
|
+
<a href="Session.src/M000020.html" target="Code" class="method-signature"
|
|
159
|
+
onclick="popupCode('Session.src/M000020.html');return false;">
|
|
160
|
+
<span class="method-name">new</span><span class="method-args">(options={})</span>
|
|
161
|
+
</a>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div class="method-description">
|
|
165
|
+
<p>
|
|
166
|
+
Sets up a session that you then operate by calling <a
|
|
167
|
+
href="Session.html#M000023">Session#run</a>. Most of the functions do not
|
|
168
|
+
work unless they are inside a <a
|
|
169
|
+
href="Session.html#M000023">Session#run</a> call.
|
|
170
|
+
</p>
|
|
171
|
+
<p>
|
|
172
|
+
Available options are:
|
|
173
|
+
</p>
|
|
174
|
+
<ul>
|
|
175
|
+
<li>:host => Required. Which host.
|
|
176
|
+
|
|
177
|
+
</li>
|
|
178
|
+
<li>:port => Required. Which port.
|
|
179
|
+
|
|
180
|
+
</li>
|
|
181
|
+
<li>:words => Dictionary to load for the words passed to <a
|
|
182
|
+
href="RandomGenerator.html">RandomGenerator</a>.
|
|
183
|
+
|
|
184
|
+
</li>
|
|
185
|
+
</ul>
|
|
186
|
+
<p>
|
|
187
|
+
You can then pass any options you need to pass to the created <a
|
|
188
|
+
href="HttpClient.html">RFuzz::HttpClient</a>.
|
|
189
|
+
</p>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
194
|
+
|
|
195
|
+
<div id="method-M000025" class="method-detail">
|
|
196
|
+
<a name="M000025"></a>
|
|
197
|
+
|
|
198
|
+
<div class="method-heading">
|
|
199
|
+
<a href="Session.src/M000025.html" target="Code" class="method-signature"
|
|
200
|
+
onclick="popupCode('Session.src/M000025.html');return false;">
|
|
201
|
+
<span class="method-name">count</span><span class="method-args">(stat,count=1)</span>
|
|
202
|
+
</a>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
<div class="method-description">
|
|
206
|
+
<p>
|
|
207
|
+
Called inside a run to do a count of a measurement.
|
|
208
|
+
</p>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<div id="method-M000031" class="method-detail">
|
|
213
|
+
<a name="M000031"></a>
|
|
214
|
+
|
|
215
|
+
<div class="method-heading">
|
|
216
|
+
<a href="Session.src/M000031.html" target="Code" class="method-signature"
|
|
217
|
+
onclick="popupCode('Session.src/M000031.html');return false;">
|
|
218
|
+
<span class="method-name">count_errors</span><span class="method-args">(as) {|| ...}</span>
|
|
219
|
+
</a>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<div class="method-description">
|
|
223
|
+
<p>
|
|
224
|
+
Used inside <a href="Session.html#M000023">Session#run</a> to wrap an
|
|
225
|
+
attempted request or potentially failing action and then count the
|
|
226
|
+
exceptions thrown.
|
|
227
|
+
</p>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<div id="method-M000027" class="method-detail">
|
|
232
|
+
<a name="M000027"></a>
|
|
233
|
+
|
|
234
|
+
<div class="method-heading">
|
|
235
|
+
<a href="Session.src/M000027.html" target="Code" class="method-signature"
|
|
236
|
+
onclick="popupCode('Session.src/M000027.html');return false;">
|
|
237
|
+
<span class="method-name">counts_to_a</span><span class="method-args">(headers=false)</span>
|
|
238
|
+
</a>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div class="method-description">
|
|
242
|
+
<p>
|
|
243
|
+
Takes the counts for all the runs and produces an array suitable for CSV
|
|
244
|
+
output. Use Session#counts to access the counts directly.
|
|
245
|
+
</p>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<div id="method-M000022" class="method-detail">
|
|
250
|
+
<a name="M000022"></a>
|
|
251
|
+
|
|
252
|
+
<div class="method-heading">
|
|
253
|
+
<a href="Session.src/M000022.html" target="Code" class="method-signature"
|
|
254
|
+
onclick="popupCode('Session.src/M000022.html');return false;">
|
|
255
|
+
<span class="method-name">cur_count</span><span class="method-args">()</span>
|
|
256
|
+
</a>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<div class="method-description">
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
|
|
263
|
+
<div id="method-M000021" class="method-detail">
|
|
264
|
+
<a name="M000021"></a>
|
|
265
|
+
|
|
266
|
+
<div class="method-heading">
|
|
267
|
+
<a href="Session.src/M000021.html" target="Code" class="method-signature"
|
|
268
|
+
onclick="popupCode('Session.src/M000021.html');return false;">
|
|
269
|
+
<span class="method-name">cur_run</span><span class="method-args">()</span>
|
|
270
|
+
</a>
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
<div class="method-description">
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<div id="method-M000023" class="method-detail">
|
|
278
|
+
<a name="M000023"></a>
|
|
279
|
+
|
|
280
|
+
<div class="method-heading">
|
|
281
|
+
<a href="Session.src/M000023.html" target="Code" class="method-signature"
|
|
282
|
+
onclick="popupCode('Session.src/M000023.html');return false;">
|
|
283
|
+
<span class="method-name">run</span><span class="method-args">(count, options={}) {|@client, @rand| ...}</span>
|
|
284
|
+
</a>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<div class="method-description">
|
|
288
|
+
<p>
|
|
289
|
+
Begin a run of count length wher a block is run once and statistics are
|
|
290
|
+
collected from the client passed to the block. When calls you can pass in
|
|
291
|
+
the following options:
|
|
292
|
+
</p>
|
|
293
|
+
<ul>
|
|
294
|
+
<li>:sample => Defaults to [:request], but will record any of [:request,
|
|
295
|
+
:connect, :send_request, :read_header, :read_body, :close]
|
|
296
|
+
|
|
297
|
+
</li>
|
|
298
|
+
<li>:save_as => A tuple of ["runs.csv", "counts.csv"]
|
|
299
|
+
(or whatever you want to call them).
|
|
300
|
+
|
|
301
|
+
</li>
|
|
302
|
+
</ul>
|
|
303
|
+
<p>
|
|
304
|
+
Once you call run, the block you pass it is given an <a
|
|
305
|
+
href="HttpClient.html">HttpClient</a> and a <a
|
|
306
|
+
href="RandomGenerator.html">RandomGenerator</a>. Each run will reset the <a
|
|
307
|
+
href="HttpClient.html">HttpClient</a> so you can pretend it is brand new.
|
|
308
|
+
</p>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<div id="method-M000026" class="method-detail">
|
|
313
|
+
<a name="M000026"></a>
|
|
314
|
+
|
|
315
|
+
<div class="method-heading">
|
|
316
|
+
<a href="Session.src/M000026.html" target="Code" class="method-signature"
|
|
317
|
+
onclick="popupCode('Session.src/M000026.html');return false;">
|
|
318
|
+
<span class="method-name">runs_to_a</span><span class="method-args">(headers=false)</span>
|
|
319
|
+
</a>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<div class="method-description">
|
|
323
|
+
<p>
|
|
324
|
+
Takes the samples for all runs and returns an array suitable for passing to
|
|
325
|
+
CSV or some other table output. If you want to access the runs directly
|
|
326
|
+
then just use the Session#runs attribute.
|
|
327
|
+
</p>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div id="method-M000024" class="method-detail">
|
|
332
|
+
<a name="M000024"></a>
|
|
333
|
+
|
|
334
|
+
<div class="method-heading">
|
|
335
|
+
<a href="Session.src/M000024.html" target="Code" class="method-signature"
|
|
336
|
+
onclick="popupCode('Session.src/M000024.html');return false;">
|
|
337
|
+
<span class="method-name">sample</span><span class="method-args">(stat,count)</span>
|
|
338
|
+
</a>
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
<div class="method-description">
|
|
342
|
+
<p>
|
|
343
|
+
Called inside a run to collect a stat you want with the given count. The
|
|
344
|
+
stat should be a string or symbol, and count should be a number (or float).
|
|
345
|
+
</p>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
|
|
349
|
+
<div id="method-M000028" class="method-detail">
|
|
350
|
+
<a name="M000028"></a>
|
|
351
|
+
|
|
352
|
+
<div class="method-heading">
|
|
353
|
+
<a href="Session.src/M000028.html" target="Code" class="method-signature"
|
|
354
|
+
onclick="popupCode('Session.src/M000028.html');return false;">
|
|
355
|
+
<span class="method-name">track</span><span class="method-args">(name,value)</span>
|
|
356
|
+
</a>
|
|
357
|
+
</div>
|
|
358
|
+
|
|
359
|
+
<div class="method-description">
|
|
360
|
+
<p>
|
|
361
|
+
Lets you track some value you need to report on later. Doesn‘t do any
|
|
362
|
+
calculations and is matched for each run. You then access Session#tracking
|
|
363
|
+
which is an Array of runs, each run being a Hash. Inside the hash is the
|
|
364
|
+
tracking you registerd by {name => [val1, val2]}.
|
|
365
|
+
</p>
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
<div id="method-M000030" class="method-detail">
|
|
370
|
+
<a name="M000030"></a>
|
|
371
|
+
|
|
372
|
+
<div class="method-heading">
|
|
373
|
+
<a href="Session.src/M000030.html" target="Code" class="method-signature"
|
|
374
|
+
onclick="popupCode('Session.src/M000030.html');return false;">
|
|
375
|
+
<span class="method-name">write_counts</span><span class="method-args">(file)</span>
|
|
376
|
+
</a>
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
<div class="method-description">
|
|
380
|
+
<p>
|
|
381
|
+
Writes the counts to the given file as a CSV.
|
|
382
|
+
</p>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
|
|
386
|
+
<div id="method-M000029" class="method-detail">
|
|
387
|
+
<a name="M000029"></a>
|
|
388
|
+
|
|
389
|
+
<div class="method-heading">
|
|
390
|
+
<a href="Session.src/M000029.html" target="Code" class="method-signature"
|
|
391
|
+
onclick="popupCode('Session.src/M000029.html');return false;">
|
|
392
|
+
<span class="method-name">write_runs</span><span class="method-args">(file)</span>
|
|
393
|
+
</a>
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
<div class="method-description">
|
|
397
|
+
<p>
|
|
398
|
+
Writes the runs to the given file as a CSV.
|
|
399
|
+
</p>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
<div id="validator-badges">
|
|
411
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
</body>
|
|
415
|
+
</html>
|