ruby-prof 0.6.0-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/CHANGES +116 -0
  2. data/LICENSE +23 -0
  3. data/README +307 -0
  4. data/Rakefile +141 -0
  5. data/bin/ruby-prof +192 -0
  6. data/examples/flat.txt +55 -0
  7. data/examples/graph.html +823 -0
  8. data/examples/graph.txt +170 -0
  9. data/ext/extconf.rb +21 -0
  10. data/ext/extconf.rb.rej +13 -0
  11. data/ext/measure_allocations.h +43 -0
  12. data/ext/measure_cpu_time.h +138 -0
  13. data/ext/measure_memory.h +42 -0
  14. data/ext/measure_process_time.h +41 -0
  15. data/ext/measure_wall_time.h +42 -0
  16. data/ext/ruby_prof.c +1628 -0
  17. data/lib/ruby-prof.rb +43 -0
  18. data/lib/ruby-prof/abstract_printer.rb +42 -0
  19. data/lib/ruby-prof/call_tree_printer.rb +76 -0
  20. data/lib/ruby-prof/call_tree_printer.rb.rej +27 -0
  21. data/lib/ruby-prof/flat_printer.rb +79 -0
  22. data/lib/ruby-prof/graph_html_printer.rb +255 -0
  23. data/lib/ruby-prof/graph_printer.rb +163 -0
  24. data/lib/ruby-prof/profile_test_case.rb +80 -0
  25. data/lib/ruby-prof/task.rb +147 -0
  26. data/lib/ruby_prof.so +0 -0
  27. data/lib/unprof.rb +8 -0
  28. data/rails_plugin/ruby-prof/init.rb +8 -0
  29. data/rails_plugin/ruby-prof/lib/profiling.rb +57 -0
  30. data/test/basic_test.rb +190 -0
  31. data/test/duplicate_names_test.rb +33 -0
  32. data/test/line_number_test.rb +69 -0
  33. data/test/measure_mode_test.rb +79 -0
  34. data/test/module_test.rb +57 -0
  35. data/test/no_method_class_test.rb +14 -0
  36. data/test/prime.rb +60 -0
  37. data/test/prime1.rb +17 -0
  38. data/test/prime2.rb +26 -0
  39. data/test/prime3.rb +17 -0
  40. data/test/prime_test.rb +24 -0
  41. data/test/printers_test.rb +74 -0
  42. data/test/profile_unit_test.rb +24 -0
  43. data/test/recursive_test.rb +144 -0
  44. data/test/singleton_test.rb +38 -0
  45. data/test/start_test.rb +24 -0
  46. data/test/test_helper.rb +55 -0
  47. data/test/test_suite.rb +19 -0
  48. data/test/thread_test.rb +135 -0
  49. data/test/timing_test.rb +133 -0
  50. metadata +116 -0
data/bin/ruby-prof ADDED
@@ -0,0 +1,192 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ # == Synopsis
4
+ #
5
+ # Profiles a Ruby program.
6
+ #
7
+ # == Usage
8
+ #
9
+ # ruby_prof [options] <script.rb> [options-for-script]
10
+ #
11
+ # Options:
12
+ # -p, --printer=printer Select a printer:
13
+ # flat - Prints a flat profile as text (default).
14
+ # graph - Prints a graph profile as text.
15
+ # graph_html - Prints a graph profile as html.
16
+ # call_tree - format for KCacheGrind
17
+ # -f, --file=path Output results to a file instead of standard out.
18
+ # -m, --min_percent=min_percent The minimum percent a method must take before ',
19
+ # being included in output reports. Should be an
20
+ # integer between 1 and 100. 0 means all methods are printed.
21
+ # --mode=measure_mode Select a measurement mode:
22
+ # process - Use process time (default).
23
+ # wall - Use wall time.
24
+ # cpu - Use the CPU clock counter
25
+ # (only supported on Pentium and PowerPCs).
26
+ # allocations - Tracks object allocations
27
+ # (requires a patched Ruby interpreter).
28
+ # --replace-progname Replace $0 when loading the .rb files.
29
+ # --specialized-instruction Turn on specialized instruction.
30
+ # -h, --help Show help message
31
+ # --version Show version
32
+ #
33
+ #
34
+ # See also: {flat profiles}[link:files/examples/flat_txt.html], {graph profiles}[link:files/examples/graph_txt.html], {html graph profiles}[link:files/examples/graph_html.html]
35
+ #
36
+
37
+ require 'ostruct'
38
+ require 'optparse'
39
+ require 'ruby-prof'
40
+
41
+ options = OpenStruct.new
42
+ options.measure_mode = RubyProf::PROCESS_TIME
43
+ options.printer = RubyProf::FlatPrinter
44
+ options.min_percent = 0
45
+ options.file = nil
46
+ options.replace_prog_name = false
47
+ options.specialized_instruction = false
48
+
49
+ opts = OptionParser.new do |opts|
50
+ opts.banner = "ruby_prof #{RubyProf::VERSION}\n" +
51
+ "Usage: ruby_prof [options] <script.rb> [--extra-options-for-script]"
52
+
53
+ opts.separator ""
54
+ opts.separator "Options:"
55
+
56
+
57
+ opts.on('-p printer', '--printer=printer', [:flat, :graph, :graph_html, :call_tree],
58
+ 'Select a printer:',
59
+ ' flat - Prints a flat profile as text (default).',
60
+ ' graph - Prints a graph profile as text.',
61
+ ' graph_html - Prints a graph profile as html.',
62
+ ' call_tree - format for KCacheGrind' ) do |printer|
63
+
64
+
65
+ case printer
66
+ when :flat
67
+ options.printer = RubyProf::FlatPrinter
68
+ when :graph
69
+ options.printer = RubyProf::GraphPrinter
70
+ when :graph_html
71
+ options.printer = RubyProf::GraphHtmlPrinter
72
+ when :call_tree
73
+ options.printer = RubyProf::CallTreePrinter
74
+ end
75
+ end
76
+
77
+ opts.on('-m min_percent', '--min_percent=min_percent', Float,
78
+ 'The minimum percent a method must take before ',
79
+ ' being included in output reports.',
80
+ ' this option is not supported for call tree.') do |min_percent|
81
+ options.min_percent = min_percent
82
+ end
83
+
84
+ opts.on('-f path', '--file=path',
85
+ 'Output results to a file instead of standard out.') do |file|
86
+ options.file = file
87
+ end
88
+
89
+ opts.on('--mode=measure_mode',
90
+ [:process, :wall, :cpu, :allocations],
91
+ 'Select what ruby-prof should measure:',
92
+ ' process - Process time (default).',
93
+ ' wall - Wall time.',
94
+ ' cpu - CPU time (Pentium and PowerPCs only).',
95
+ ' allocations - Object allocations (requires patched Ruby interpreter).') do |measure_mode|
96
+
97
+ case measure_mode
98
+ when :process
99
+ options.measure_mode = RubyProf::PROCESS_TIME
100
+ when :wall
101
+ options.measure_mode = RubyProf::WALL_TIME
102
+ when :cpu
103
+ options.measure_mode = RubyProf::CPU_TIME
104
+ when :allocations
105
+ options.measure_mode = RubyProf::ALLOCATIONS
106
+ end
107
+ end
108
+
109
+ opts.on("--replace-progname", "Replace $0 when loading the .rb files.") do
110
+ options.replace_prog_name = true
111
+ end
112
+
113
+ if defined?(VM)
114
+ opts.on("--specialized-instruction", "Turn on specified instruction.") do
115
+ options.specialized_instruction = true
116
+ end
117
+ end
118
+
119
+ opts.on_tail("-h", "--help", "Show help message") do
120
+ puts opts
121
+ exit
122
+ end
123
+
124
+ opts.on_tail("-v", "--version", "Show version") do
125
+ puts "ruby_prof " + RubyProf::VERSION
126
+ exit
127
+ end
128
+ end
129
+
130
+ begin
131
+ opts.parse! ARGV
132
+ rescue OptionParser::InvalidOption, OptionParser::InvalidArgument,
133
+ OptionParser::MissingArgument => e
134
+ puts opts
135
+ puts
136
+ puts e.message
137
+ exit(-1)
138
+ end
139
+
140
+ # Make sure the user specified at least one file
141
+ if ARGV.length < 1
142
+ puts opts
143
+ puts ""
144
+ puts "Must specify a script to run"
145
+ exit(-1)
146
+ end
147
+
148
+
149
+ # Install at_exit handler. It is important that we do this
150
+ # before loading the scripts so our at_exit handler run
151
+ # *after* any other one that will be installed.
152
+
153
+ at_exit {
154
+ # Stop profiling
155
+ result = RubyProf.stop
156
+
157
+ # Create a printer
158
+ printer = options.printer.new(result)
159
+
160
+ # Get output
161
+ if options.file
162
+ File.open(options.file, 'w') do |file|
163
+ printer.print(file, {:min_percent => options.min_percent})
164
+ end
165
+ else
166
+ # Print out results
167
+ printer.print(STDOUT, {:min_percent => options.min_percent})
168
+ end
169
+ }
170
+
171
+ # Now set measure mode
172
+ RubyProf.measure_mode = options.measure_mode
173
+
174
+ # Set VM compile option
175
+ if defined?(VM)
176
+ VM::InstructionSequence.compile_option = {
177
+ :trace_instruction => true,
178
+ :specialized_instruction => options.specialized_instruction
179
+ }
180
+ end
181
+
182
+ # Get the script we will execute
183
+ script = ARGV.shift
184
+ if options.replace_prog_name
185
+ $0 = File.basename(File.expand_path(script))
186
+ end
187
+
188
+ # Start profiling
189
+ RubyProf.start
190
+
191
+ # Load the script
192
+ load script
data/examples/flat.txt ADDED
@@ -0,0 +1,55 @@
1
+ = Flat Profiles
2
+
3
+ Flat profiles show the total amount of time spent in each method.
4
+ As an example, here is the output from running printers_test.rb.
5
+
6
+ Thread ID: 21277412
7
+ %self cumulative total self children calls self/call total/call name
8
+ 46.34 4.06 8.72 4.06 4.66 501 0.01 0.02 Integer#upto
9
+ 23.89 6.16 2.09 2.09 0.00 61 0.03 0.03 Kernel.sleep
10
+ 15.12 7.48 1.33 1.33 0.00 250862 0.00 0.00 Fixnum#%
11
+ 14.13 8.72 1.24 1.24 0.00 250862 0.00 0.00 Fixnum#==
12
+ 0.18 8.74 0.02 0.02 0.00 1 0.02 0.02 Array#each_index
13
+ 0.17 8.75 6.64 0.01 6.63 500 0.00 0.01 Object#is_prime
14
+ 0.17 8.77 6.66 0.01 6.64 1 0.01 6.66 Array#select
15
+ 0.00 8.77 0.00 0.00 0.00 501 0.00 0.00 Fixnum#-
16
+ 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Array#first
17
+ 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Array#length
18
+ 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Array#initialize
19
+ 0.00 8.77 8.77 0.00 8.77 1 0.00 8.77 Object#run_primes
20
+ 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Integer#to_int
21
+ 0.00 8.77 6.66 0.00 6.66 1 0.00 6.66 Object#find_primes
22
+ 0.00 8.77 2.09 0.00 2.09 1 0.00 2.09 Object#find_largest
23
+ 0.00 8.77 0.02 0.00 0.02 1 0.00 0.02 Object#make_random_array
24
+ 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Class#new
25
+ 0.00 8.77 0.00 0.00 0.00 500 0.00 0.00 Array#[]=
26
+ 0.00 8.77 0.00 0.00 0.00 61 0.00 0.00 Fixnum#>
27
+ 0.00 8.77 0.00 0.00 0.00 61 0.00 0.00 Array#[]
28
+ 0.00 8.77 8.77 0.00 8.77 1 0.00 8.77 #toplevel
29
+ 0.00 8.77 0.00 0.00 0.00 500 0.00 0.00 Kernel.rand
30
+
31
+ All values are in seconds.
32
+
33
+ The columns are:
34
+
35
+ %self - The percentage of time spent in this method, derived from self_time/total_time
36
+ cumulative - The sum of the time spent in this method and all the methods listed above it.
37
+ total - The time spent in this method and its children.
38
+ self - The time spent in this method.
39
+ children - The time spent in this method's children.
40
+ calls - The number of times this method was called.
41
+ self/call - The average time spent per call in this method.
42
+ total/call - The average time spent per call in this method and its children.
43
+ name - The name of the method.
44
+
45
+ Methods are sorted based on %self, therefore the methods that execute the longest are listed
46
+ first.
47
+
48
+ The interpretation of method names is:
49
+ * #toplevel - The root method that calls all other methods
50
+ * MyObject#test - An instance method "test" of the class "MyObject"
51
+ * <Object:MyObject>#test - The <> characters indicate a singleton method on a singleton class.
52
+
53
+ For example, wee can see that Integer#upto took the most time, 4.06 seconds. An additional
54
+ 4.66 seconds were spent in its children, for a total time of 8.72 seconds.
55
+
@@ -0,0 +1,823 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <style media="all" type="text/css">
5
+ table {
6
+ border-collapse: collapse;
7
+ border: 1px solid #CCC;
8
+ font-family: Verdana, Arial, Helvetica, sans-serif;
9
+ font-size: 9pt;
10
+ line-height: normal;
11
+ }
12
+
13
+ th {
14
+ text-align: center;
15
+ border-top: 1px solid #FB7A31;
16
+ border-bottom: 1px solid #FB7A31;
17
+ background: #FFC;
18
+ padding: 0.3em;
19
+ border-left: 1px solid silver;
20
+ }
21
+
22
+ tr.break td {
23
+ border: 0;
24
+ border-top: 1px solid #FB7A31;
25
+ padding: 0;
26
+ margin: 0;
27
+ }
28
+
29
+ tr.method td {
30
+ font-weight: bold;
31
+ }
32
+
33
+ td {
34
+ padding: 0.3em;
35
+ }
36
+
37
+ td:first-child {
38
+ width: 190px;
39
+ }
40
+
41
+ td {
42
+ border-left: 1px solid #CCC;
43
+ text-align: center;
44
+ }
45
+ </style>
46
+ </head>
47
+ <body>
48
+ <h1> Graph Profile</h1>
49
+ <p>Graph profiles show how long each method runs, which methods call it
50
+ and which methods it calls. To understand how to read a graph profile, refer to
51
+ the <a href="graph.txt">documentation</a> for the text graph report. </p>
52
+ <p>The main advantage of an HTML graph format versus the text format is the use of
53
+ hyperlinks to jump between methods. This makes it easier to understand the flow
54
+ of control through a program and which methods take the most time.</p>
55
+ <p>Below is the output from running printers_test.rb reproduced in HTML. </p>
56
+ <p>Profile Report</p>
57
+
58
+ <table>
59
+ <tr>
60
+ <th>Thread ID</th>
61
+ <th>Total Time</th>
62
+ </tr>
63
+ <tr>
64
+ <td><a href="#21277412">21277412</a></td>
65
+ <td>8.766</td>
66
+ </tr>
67
+ </table>
68
+
69
+ <h2><a name="21277412">Thread 21277412</a></h2>
70
+ <table>
71
+ <tr>
72
+ <th> %Total</th>
73
+ <th> %Self</th>
74
+ <th> Total</th>
75
+ <th> Self</th>
76
+ <th> Children</th>
77
+ <th> Calls</th>
78
+ <th>Name</th>
79
+ </tr>
80
+
81
+ <tr class="method">
82
+ <td> 100.00%</td>
83
+ <td> 0.00%</td>
84
+ <td> 8.77</td>
85
+ <td> 0.00</td>
86
+ <td> 8.77</td>
87
+ <td> 1</td>
88
+ <td><a name="_toplevel_21277412">#toplevel</a></td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td>&nbsp;</td>
93
+ <td>&nbsp;</td>
94
+ <td> 8.77</td>
95
+ <td> 0.00</td>
96
+ <td> 8.77</td>
97
+ <td> 1/1</td>
98
+ <td><a href="#Object_run_primes_21277412">Object#run_primes</a></td>
99
+ </tr>
100
+
101
+ <tr class="break">
102
+ <td colspan="7"></td>
103
+ </tr>
104
+
105
+ <tr>
106
+ <td>&nbsp;</td>
107
+ <td>&nbsp;</td>
108
+ <td> 8.77</td>
109
+ <td> 0.00</td>
110
+ <td> 8.77</td>
111
+ <td> 1/1</td>
112
+ <td><a href="#_toplevel_21277412">#toplevel</a></td>
113
+ </tr>
114
+ <tr class="method">
115
+ <td> 100.00%</td>
116
+ <td> 0.00%</td>
117
+ <td> 8.77</td>
118
+ <td> 0.00</td>
119
+ <td> 8.77</td>
120
+ <td> 1</td>
121
+ <td><a name="Object_run_primes_21277412">Object#run_primes</a></td>
122
+ </tr>
123
+
124
+ <tr>
125
+ <td>&nbsp;</td>
126
+ <td>&nbsp;</td>
127
+ <td> 0.02</td>
128
+ <td> 0.00</td>
129
+ <td> 0.02</td>
130
+ <td> 1/1</td>
131
+ <td><a href="#Object_make_random_array_21277412">Object#make_random_array</a></td>
132
+ </tr>
133
+ <tr>
134
+ <td>&nbsp;</td>
135
+ <td>&nbsp;</td>
136
+ <td> 2.09</td>
137
+ <td> 0.00</td>
138
+ <td> 2.09</td>
139
+ <td> 1/1</td>
140
+ <td><a href="#Object_find_largest_21277412">Object#find_largest</a></td>
141
+ </tr>
142
+ <tr>
143
+ <td>&nbsp;</td>
144
+ <td>&nbsp;</td>
145
+ <td> 6.66</td>
146
+ <td> 0.00</td>
147
+ <td> 6.66</td>
148
+ <td> 1/1</td>
149
+ <td><a href="#Object_find_primes_21277412">Object#find_primes</a></td>
150
+ </tr>
151
+
152
+ <tr class="break">
153
+ <td colspan="7"></td>
154
+ </tr>
155
+
156
+ <tr>
157
+ <td>&nbsp;</td>
158
+ <td>&nbsp;</td>
159
+ <td> 6.63</td>
160
+ <td> 4.06</td>
161
+ <td> 2.56</td>
162
+ <td> 500/501</td>
163
+ <td><a href="#Object_is_prime_21277412">Object#is_prime</a></td>
164
+ </tr>
165
+ <tr>
166
+ <td>&nbsp;</td>
167
+ <td>&nbsp;</td>
168
+ <td> 2.09</td>
169
+ <td> 0.00</td>
170
+ <td> 2.09</td>
171
+ <td> 1/501</td>
172
+ <td><a href="#Object_find_largest_21277412">Object#find_largest</a></td>
173
+ </tr>
174
+ <tr class="method">
175
+ <td> 99.48%</td>
176
+ <td> 46.34%</td>
177
+ <td> 8.72</td>
178
+ <td> 4.06</td>
179
+ <td> 4.66</td>
180
+ <td> 501</td>
181
+ <td><a name="Integer_upto_21277412">Integer#upto</a></td>
182
+ </tr>
183
+
184
+ <tr>
185
+ <td>&nbsp;</td>
186
+ <td>&nbsp;</td>
187
+ <td> 0.00</td>
188
+ <td> 0.00</td>
189
+ <td> 0.00</td>
190
+ <td> 61/61</td>
191
+ <td><a href="#Array_[]_21277412">Array#[]</a></td>
192
+ </tr>
193
+ <tr>
194
+ <td>&nbsp;</td>
195
+ <td>&nbsp;</td>
196
+ <td> 0.00</td>
197
+ <td> 0.00</td>
198
+ <td> 0.00</td>
199
+ <td> 61/61</td>
200
+ <td><a href="#Fixnum_>_21277412">Fixnum#_</a></td>
201
+ </tr>
202
+ <tr>
203
+ <td>&nbsp;</td>
204
+ <td>&nbsp;</td>
205
+ <td> 2.09</td>
206
+ <td> 2.09</td>
207
+ <td> 0.00</td>
208
+ <td> 61/61</td>
209
+ <td><a href="#Kernel_sleep_21277412">Kernel.sleep</a></td>
210
+ </tr>
211
+ <tr>
212
+ <td>&nbsp;</td>
213
+ <td>&nbsp;</td>
214
+ <td> 1.24</td>
215
+ <td> 1.24</td>
216
+ <td> 0.00</td>
217
+ <td> 250862/250862</td>
218
+ <td><a href="#Fixnum____21277412">Fixnum#==</a></td>
219
+ </tr>
220
+ <tr>
221
+ <td>&nbsp;</td>
222
+ <td>&nbsp;</td>
223
+ <td> 1.33</td>
224
+ <td> 1.33</td>
225
+ <td> 0.00</td>
226
+ <td> 250862/250862</td>
227
+ <td><a href="#Fixnum_%_21277412">Fixnum#%</a></td>
228
+ </tr>
229
+
230
+ <tr class="break">
231
+ <td colspan="7"></td>
232
+ </tr>
233
+
234
+ <tr>
235
+ <td>&nbsp;</td>
236
+ <td>&nbsp;</td>
237
+ <td> 6.66</td>
238
+ <td> 0.01</td>
239
+ <td> 6.64</td>
240
+ <td> 1/1</td>
241
+ <td><a href="#Object_find_primes_21277412">Object#find_primes</a></td>
242
+ </tr>
243
+ <tr class="method">
244
+ <td> 75.93%</td>
245
+ <td> 0.17%</td>
246
+ <td> 6.66</td>
247
+ <td> 0.01</td>
248
+ <td> 6.64</td>
249
+ <td> 1</td>
250
+ <td><a name="Array_select_21277412">Array#select</a></td>
251
+ </tr>
252
+
253
+ <tr>
254
+ <td>&nbsp;</td>
255
+ <td>&nbsp;</td>
256
+ <td> 6.64</td>
257
+ <td> 0.01</td>
258
+ <td> 6.63</td>
259
+ <td> 500/500</td>
260
+ <td><a href="#Object_is_prime_21277412">Object#is_prime</a></td>
261
+ </tr>
262
+
263
+ <tr class="break">
264
+ <td colspan="7"></td>
265
+ </tr>
266
+
267
+ <tr>
268
+ <td>&nbsp;</td>
269
+ <td>&nbsp;</td>
270
+ <td> 6.66</td>
271
+ <td> 0.00</td>
272
+ <td> 6.66</td>
273
+ <td> 1/1</td>
274
+ <td><a href="#Object_run_primes_21277412">Object#run_primes</a></td>
275
+ </tr>
276
+ <tr class="method">
277
+ <td> 75.93%</td>
278
+ <td> 0.00%</td>
279
+ <td> 6.66</td>
280
+ <td> 0.00</td>
281
+ <td> 6.66</td>
282
+ <td> 1</td>
283
+ <td><a name="Object_find_primes_21277412">Object#find_primes</a></td>
284
+ </tr>
285
+ <tr>
286
+ <td>&nbsp;</td>
287
+ <td>&nbsp;</td>
288
+ <td> 6.66</td>
289
+ <td> 0.01</td>
290
+ <td> 6.64</td>
291
+ <td> 1/1</td>
292
+ <td><a href="#Array_select_21277412">Array#select</a></td>
293
+ </tr>
294
+ <tr class="break">
295
+ <td colspan="7"></td>
296
+ </tr>
297
+
298
+ <tr>
299
+ <td>&nbsp;</td>
300
+ <td>&nbsp;</td>
301
+ <td> 6.64</td>
302
+ <td> 0.01</td>
303
+ <td> 6.63</td>
304
+ <td> 500/500</td>
305
+ <td><a href="#Array_select_21277412">Array#select</a></td>
306
+ </tr>
307
+ <tr class="method">
308
+ <td> 75.76%</td>
309
+ <td> 0.17%</td>
310
+ <td> 6.64</td>
311
+ <td> 0.01</td>
312
+ <td> 6.63</td>
313
+ <td> 500</td>
314
+ <td><a name="Object_is_prime_21277412">Object#is_prime</a></td>
315
+ </tr>
316
+
317
+ <tr>
318
+ <td>&nbsp;</td>
319
+ <td>&nbsp;</td>
320
+ <td> 0.00</td>
321
+ <td> 0.00</td>
322
+ <td> 0.00</td>
323
+ <td> 500/501</td>
324
+ <td><a href="#Fixnum_-_21277412">Fixnum#-</a></td>
325
+ </tr>
326
+ <tr>
327
+ <td>&nbsp;</td>
328
+ <td>&nbsp;</td>
329
+ <td> 6.63</td>
330
+ <td> 4.06</td>
331
+ <td> 2.56</td>
332
+ <td> 500/501</td>
333
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
334
+ </tr>
335
+
336
+ <tr class="break">
337
+ <td colspan="7"></td>
338
+ </tr>
339
+
340
+ <tr>
341
+ <td>&nbsp;</td>
342
+ <td>&nbsp;</td>
343
+ <td> 2.09</td>
344
+ <td> 0.00</td>
345
+ <td> 2.09</td>
346
+ <td> 1/1</td>
347
+ <td><a href="#Object_run_primes_21277412">Object#run_primes</a></td>
348
+ </tr>
349
+ <tr class="method">
350
+ <td> 23.89%</td>
351
+ <td> 0.00%</td>
352
+ <td> 2.09</td>
353
+ <td> 0.00</td>
354
+ <td> 2.09</td>
355
+ <td> 1</td>
356
+ <td><a name="Object_find_largest_21277412">Object#find_largest</a></td>
357
+ </tr>
358
+
359
+ <tr>
360
+ <td>&nbsp;</td>
361
+ <td>&nbsp;</td>
362
+ <td> 0.00</td>
363
+ <td> 0.00</td>
364
+ <td> 0.00</td>
365
+ <td> 1/501</td>
366
+ <td><a href="#Fixnum_-_21277412">Fixnum#-</a></td>
367
+ </tr>
368
+ <tr>
369
+ <td>&nbsp;</td>
370
+ <td>&nbsp;</td>
371
+ <td> 2.09</td>
372
+ <td> 0.00</td>
373
+ <td> 2.09</td>
374
+ <td> 1/501</td>
375
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
376
+ </tr>
377
+ <tr>
378
+ <td>&nbsp;</td>
379
+ <td>&nbsp;</td>
380
+ <td> 0.00</td>
381
+ <td> 0.00</td>
382
+ <td> 0.00</td>
383
+ <td> 1/1</td>
384
+ <td><a href="#Array_first_21277412">Array#first</a></td>
385
+ </tr>
386
+ <tr>
387
+ <td>&nbsp;</td>
388
+ <td>&nbsp;</td>
389
+ <td> 0.00</td>
390
+ <td> 0.00</td>
391
+ <td> 0.00</td>
392
+ <td> 1/1</td>
393
+ <td><a href="#Array_length_21277412">Array#length</a></td>
394
+ </tr>
395
+
396
+ <tr class="break">
397
+ <td colspan="7"></td>
398
+ </tr>
399
+
400
+ <tr>
401
+ <td>&nbsp;</td>
402
+ <td>&nbsp;</td>
403
+ <td> 2.09</td>
404
+ <td> 2.09</td>
405
+ <td> 0.00</td>
406
+ <td> 61/61</td>
407
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
408
+ </tr>
409
+ <tr class="method">
410
+ <td> 23.89%</td>
411
+ <td> 23.89%</td>
412
+ <td> 2.09</td>
413
+ <td> 2.09</td>
414
+ <td> 0.00</td>
415
+ <td> 61</td>
416
+ <td><a name="Kernel_sleep_21277412">Kernel.sleep</a></td>
417
+ </tr>
418
+
419
+
420
+ <tr class="break">
421
+ <td colspan="7"></td>
422
+ </tr>
423
+
424
+ <tr>
425
+ <td>&nbsp;</td>
426
+ <td>&nbsp;</td>
427
+ <td> 1.33</td>
428
+ <td> 1.33</td>
429
+ <td> 0.00</td>
430
+ <td> 250862/250862</td>
431
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
432
+ </tr>
433
+ <tr class="method">
434
+ <td> 15.12%</td>
435
+ <td> 15.12%</td>
436
+ <td> 1.33</td>
437
+ <td> 1.33</td>
438
+ <td> 0.00</td>
439
+ <td> 250862</td>
440
+ <td><a name="Fixnum_%_21277412">Fixnum#%</a></td>
441
+ </tr>
442
+
443
+ <tr class="break">
444
+ <td colspan="7"></td>
445
+ </tr>
446
+
447
+ <tr>
448
+ <td>&nbsp;</td>
449
+ <td>&nbsp;</td>
450
+ <td> 1.24</td>
451
+ <td> 1.24</td>
452
+ <td> 0.00</td>
453
+ <td> 250862/250862</td>
454
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
455
+ </tr>
456
+ <tr class="method">
457
+ <td> 14.13%</td>
458
+ <td> 14.13%</td>
459
+ <td> 1.24</td>
460
+ <td> 1.24</td>
461
+ <td> 0.00</td>
462
+ <td> 250862</td>
463
+ <td><a name="Fixnum____21277412">Fixnum#==</a></td>
464
+ </tr>
465
+
466
+
467
+ <tr class="break">
468
+ <td colspan="7"></td>
469
+ </tr>
470
+
471
+ <tr>
472
+ <td>&nbsp;</td>
473
+ <td>&nbsp;</td>
474
+ <td> 0.02</td>
475
+ <td> 0.00</td>
476
+ <td> 0.02</td>
477
+ <td> 1/1</td>
478
+ <td><a href="#Object_run_primes_21277412">Object#run_primes</a></td>
479
+ </tr>
480
+ <tr class="method">
481
+ <td> 0.18%</td>
482
+ <td> 0.00%</td>
483
+ <td> 0.02</td>
484
+ <td> 0.00</td>
485
+ <td> 0.02</td>
486
+ <td> 1</td>
487
+ <td><a name="Object_make_random_array_21277412">Object#make_random_array</a></td>
488
+ </tr>
489
+
490
+ <tr>
491
+ <td>&nbsp;</td>
492
+ <td>&nbsp;</td>
493
+ <td> 0.02</td>
494
+ <td> 0.02</td>
495
+ <td> 0.00</td>
496
+ <td> 1/1</td>
497
+ <td><a href="#Array_each_index_21277412">Array#each_index</a></td>
498
+ </tr>
499
+ <tr>
500
+ <td>&nbsp;</td>
501
+ <td>&nbsp;</td>
502
+ <td> 0.00</td>
503
+ <td> 0.00</td>
504
+ <td> 0.00</td>
505
+ <td> 1/1</td>
506
+ <td><a href="#Class_new_21277412">Class#new</a></td>
507
+ </tr>
508
+
509
+ <tr class="break">
510
+ <td colspan="7"></td>
511
+ </tr>
512
+
513
+ <tr>
514
+ <td>&nbsp;</td>
515
+ <td>&nbsp;</td>
516
+ <td> 0.02</td>
517
+ <td> 0.02</td>
518
+ <td> 0.00</td>
519
+ <td> 1/1</td>
520
+ <td><a href="#Object_make_random_array_21277412">Object#make_random_array</a></td>
521
+ </tr>
522
+ <tr class="method">
523
+ <td> 0.18%</td>
524
+ <td> 0.18%</td>
525
+ <td> 0.02</td>
526
+ <td> 0.02</td>
527
+ <td> 0.00</td>
528
+ <td> 1</td>
529
+ <td><a name="Array_each_index_21277412">Array#each_index</a></td>
530
+ </tr>
531
+
532
+ <tr>
533
+ <td>&nbsp;</td>
534
+ <td>&nbsp;</td>
535
+ <td> 0.00</td>
536
+ <td> 0.00</td>
537
+ <td> 0.00</td>
538
+ <td> 500/500</td>
539
+ <td><a href="#Kernel_rand_21277412">Kernel.rand</a></td>
540
+ </tr>
541
+ <tr>
542
+ <td>&nbsp;</td>
543
+ <td>&nbsp;</td>
544
+ <td> 0.00</td>
545
+ <td> 0.00</td>
546
+ <td> 0.00</td>
547
+ <td> 500/500</td>
548
+ <td><a href="#Array_[]__21277412">Array#[]=</a></td>
549
+ </tr>
550
+
551
+ <tr class="break">
552
+ <td colspan="7"></td>
553
+ </tr>
554
+
555
+ <tr>
556
+ <td>&nbsp;</td>
557
+ <td>&nbsp;</td>
558
+ <td> 0.00</td>
559
+ <td> 0.00</td>
560
+ <td> 0.00</td>
561
+ <td> 500/501</td>
562
+ <td><a href="#Object_is_prime_21277412">Object#is_prime</a></td>
563
+ </tr>
564
+ <tr>
565
+ <td>&nbsp;</td>
566
+ <td>&nbsp;</td>
567
+ <td> 0.00</td>
568
+ <td> 0.00</td>
569
+ <td> 0.00</td>
570
+ <td> 1/501</td>
571
+ <td><a href="#Object_find_largest_21277412">Object#find_largest</a></td>
572
+ </tr>
573
+ <tr class="method">
574
+ <td> 0.00%</td>
575
+ <td> 0.00%</td>
576
+ <td> 0.00</td>
577
+ <td> 0.00</td>
578
+ <td> 0.00</td>
579
+ <td> 501</td>
580
+ <td><a name="Fixnum_-_21277412">Fixnum#-</a></td>
581
+ </tr>
582
+
583
+
584
+ <tr class="break">
585
+ <td colspan="7"></td>
586
+ </tr>
587
+
588
+ <tr>
589
+ <td>&nbsp;</td>
590
+ <td>&nbsp;</td>
591
+ <td> 0.00</td>
592
+ <td> 0.00</td>
593
+ <td> 0.00</td>
594
+ <td> 1/1</td>
595
+ <td><a href="#Kernel_rand_21277412">Kernel.rand</a></td>
596
+ </tr>
597
+ <tr class="method">
598
+ <td> 0.00%</td>
599
+ <td> 0.00%</td>
600
+ <td> 0.00</td>
601
+ <td> 0.00</td>
602
+ <td> 0.00</td>
603
+ <td> 1</td>
604
+ <td><a name="Integer_to_int_21277412">Integer#to_int</a></td>
605
+ </tr>
606
+
607
+
608
+ <tr class="break">
609
+ <td colspan="7"></td>
610
+ </tr>
611
+
612
+ <tr>
613
+ <td>&nbsp;</td>
614
+ <td>&nbsp;</td>
615
+ <td> 0.00</td>
616
+ <td> 0.00</td>
617
+ <td> 0.00</td>
618
+ <td> 1/1</td>
619
+ <td><a href="#Object_find_largest_21277412">Object#find_largest</a></td>
620
+ </tr>
621
+ <tr class="method">
622
+ <td> 0.00%</td>
623
+ <td> 0.00%</td>
624
+ <td> 0.00</td>
625
+ <td> 0.00</td>
626
+ <td> 0.00</td>
627
+ <td> 1</td>
628
+ <td><a name="Array_first_21277412">Array#first</a></td>
629
+ </tr>
630
+
631
+
632
+ <tr class="break">
633
+ <td colspan="7"></td>
634
+ </tr>
635
+
636
+ <tr>
637
+ <td>&nbsp;</td>
638
+ <td>&nbsp;</td>
639
+ <td> 0.00</td>
640
+ <td> 0.00</td>
641
+ <td> 0.00</td>
642
+ <td> 1/1</td>
643
+ <td><a href="#Class_new_21277412">Class#new</a></td>
644
+ </tr>
645
+ <tr class="method">
646
+ <td> 0.00%</td>
647
+ <td> 0.00%</td>
648
+ <td> 0.00</td>
649
+ <td> 0.00</td>
650
+ <td> 0.00</td>
651
+ <td> 1</td>
652
+ <td><a name="Array_initialize_21277412">Array#initialize</a></td>
653
+ </tr>
654
+
655
+
656
+ <tr class="break">
657
+ <td colspan="7"></td>
658
+ </tr>
659
+
660
+ <tr>
661
+ <td>&nbsp;</td>
662
+ <td>&nbsp;</td>
663
+ <td> 0.00</td>
664
+ <td> 0.00</td>
665
+ <td> 0.00</td>
666
+ <td> 1/1</td>
667
+ <td><a href="#Object_find_largest_21277412">Object#find_largest</a></td>
668
+ </tr>
669
+ <tr class="method">
670
+ <td> 0.00%</td>
671
+ <td> 0.00%</td>
672
+ <td> 0.00</td>
673
+ <td> 0.00</td>
674
+ <td> 0.00</td>
675
+ <td> 1</td>
676
+ <td><a name="Array_length_21277412">Array#length</a></td>
677
+ </tr>
678
+
679
+
680
+ <tr class="break">
681
+ <td colspan="7"></td>
682
+ </tr>
683
+
684
+ <tr>
685
+ <td>&nbsp;</td>
686
+ <td>&nbsp;</td>
687
+ <td> 0.00</td>
688
+ <td> 0.00</td>
689
+ <td> 0.00</td>
690
+ <td> 1/1</td>
691
+ <td><a href="#Object_make_random_array_21277412">Object#make_random_array</a></td>
692
+ </tr>
693
+ <tr class="method">
694
+ <td> 0.00%</td>
695
+ <td> 0.00%</td>
696
+ <td> 0.00</td>
697
+ <td> 0.00</td>
698
+ <td> 0.00</td>
699
+ <td> 1</td>
700
+ <td><a name="Class_new_21277412">Class#new</a></td>
701
+ </tr>
702
+
703
+ <tr>
704
+ <td>&nbsp;</td>
705
+ <td>&nbsp;</td>
706
+ <td> 0.00</td>
707
+ <td> 0.00</td>
708
+ <td> 0.00</td>
709
+ <td> 1/1</td>
710
+ <td><a href="#Array_initialize_21277412">Array#initialize</a></td>
711
+ </tr>
712
+
713
+ <tr class="break">
714
+ <td colspan="7"></td>
715
+ </tr>
716
+
717
+ <tr>
718
+ <td>&nbsp;</td>
719
+ <td>&nbsp;</td>
720
+ <td> 0.00</td>
721
+ <td> 0.00</td>
722
+ <td> 0.00</td>
723
+ <td> 61/61</td>
724
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
725
+ </tr>
726
+ <tr class="method">
727
+ <td> 0.00%</td>
728
+ <td> 0.00%</td>
729
+ <td> 0.00</td>
730
+ <td> 0.00</td>
731
+ <td> 0.00</td>
732
+ <td> 61</td>
733
+ <td><a name="Fixnum_>_21277412">Fixnum#_</a></td>
734
+ </tr>
735
+
736
+
737
+ <tr class="break">
738
+ <td colspan="7"></td>
739
+ </tr>
740
+
741
+ <tr>
742
+ <td>&nbsp;</td>
743
+ <td>&nbsp;</td>
744
+ <td> 0.00</td>
745
+ <td> 0.00</td>
746
+ <td> 0.00</td>
747
+ <td> 61/61</td>
748
+ <td><a href="#Integer_upto_21277412">Integer#upto</a></td>
749
+ </tr>
750
+ <tr class="method">
751
+ <td> 0.00%</td>
752
+ <td> 0.00%</td>
753
+ <td> 0.00</td>
754
+ <td> 0.00</td>
755
+ <td> 0.00</td>
756
+ <td> 61</td>
757
+ <td><a name="Array_[]_21277412">Array#[]</a></td>
758
+ </tr>
759
+
760
+
761
+ <tr class="break">
762
+ <td colspan="7"></td>
763
+ </tr>
764
+
765
+ <tr>
766
+ <td>&nbsp;</td>
767
+ <td>&nbsp;</td>
768
+ <td> 0.00</td>
769
+ <td> 0.00</td>
770
+ <td> 0.00</td>
771
+ <td> 500/500</td>
772
+ <td><a href="#Array_each_index_21277412">Array#each_index</a></td>
773
+ </tr>
774
+ <tr class="method">
775
+ <td> 0.00%</td>
776
+ <td> 0.00%</td>
777
+ <td> 0.00</td>
778
+ <td> 0.00</td>
779
+ <td> 0.00</td>
780
+ <td> 500</td>
781
+ <td><a name="Array_[]__21277412">Array#[]=</a></td>
782
+ </tr>
783
+
784
+
785
+ <tr class="break">
786
+ <td colspan="7"></td>
787
+ </tr>
788
+
789
+ <tr>
790
+ <td>&nbsp;</td>
791
+ <td>&nbsp;</td>
792
+ <td> 0.00</td>
793
+ <td> 0.00</td>
794
+ <td> 0.00</td>
795
+ <td> 500/500</td>
796
+ <td><a href="#Array_each_index_21277412">Array#each_index</a></td>
797
+ </tr>
798
+ <tr class="method">
799
+ <td> 0.00%</td>
800
+ <td> 0.00%</td>
801
+ <td> 0.00</td>
802
+ <td> 0.00</td>
803
+ <td> 0.00</td>
804
+ <td> 500</td>
805
+ <td><a name="Kernel_rand_21277412">Kernel.rand</a></td>
806
+ </tr>
807
+
808
+ <tr>
809
+ <td>&nbsp;</td>
810
+ <td>&nbsp;</td>
811
+ <td> 0.00</td>
812
+ <td> 0.00</td>
813
+ <td> 0.00</td>
814
+ <td> 1/1</td>
815
+ <td><a href="#Integer_to_int_21277412">Integer#to_int</a></td>
816
+ </tr>
817
+
818
+ <tr class="break">
819
+ <td colspan="7"></td>
820
+ </tr>
821
+ </table>
822
+ </body>
823
+ </html>