rdp-ruby-prof 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/CHANGES +202 -0
  2. data/LICENSE +23 -0
  3. data/README +445 -0
  4. data/Rakefile +123 -0
  5. data/bin/ruby-prof +207 -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/#ruby_prof.c# +1679 -0
  10. data/ext/Makefile +180 -0
  11. data/ext/extconf.rb +40 -0
  12. data/ext/measure_allocations.h +58 -0
  13. data/ext/measure_cpu_time.h +152 -0
  14. data/ext/measure_gc_runs.h +76 -0
  15. data/ext/measure_gc_time.h +57 -0
  16. data/ext/measure_memory.h +101 -0
  17. data/ext/measure_process_time.h +52 -0
  18. data/ext/measure_wall_time.h +53 -0
  19. data/ext/mingw/Rakefile +23 -0
  20. data/ext/mingw/build.rake +38 -0
  21. data/ext/ruby_prof.c +1707 -0
  22. data/ext/ruby_prof.e +19984 -0
  23. data/ext/ruby_prof.h +188 -0
  24. data/ext/vc/ruby_prof.sln +20 -0
  25. data/ext/vc/ruby_prof.vcproj +241 -0
  26. data/ext/version.h +4 -0
  27. data/lib/ruby-prof.rb +48 -0
  28. data/lib/ruby-prof/abstract_printer.rb +41 -0
  29. data/lib/ruby-prof/aggregate_call_info.rb +62 -0
  30. data/lib/ruby-prof/call_info.rb +47 -0
  31. data/lib/ruby-prof/call_tree_printer.rb +84 -0
  32. data/lib/ruby-prof/flat_printer.rb +79 -0
  33. data/lib/ruby-prof/graph_html_printer.rb +256 -0
  34. data/lib/ruby-prof/graph_html_printer.rb.orig +256 -0
  35. data/lib/ruby-prof/graph_html_printer.rb.rej +34 -0
  36. data/lib/ruby-prof/graph_printer.rb +164 -0
  37. data/lib/ruby-prof/graph_printer.rb.orig +164 -0
  38. data/lib/ruby-prof/method_info.rb +111 -0
  39. data/lib/ruby-prof/task.rb +146 -0
  40. data/lib/ruby-prof/test.rb +148 -0
  41. data/lib/unprof.rb +8 -0
  42. data/rails/environment/profile.rb +24 -0
  43. data/rails/example/example_test.rb +9 -0
  44. data/rails/profile_test_helper.rb +21 -0
  45. data/test/aggregate_test.rb +121 -0
  46. data/test/basic_test.rb +283 -0
  47. data/test/duplicate_names_test.rb +32 -0
  48. data/test/exceptions_test.rb +15 -0
  49. data/test/exclude_threads_test.rb +54 -0
  50. data/test/line_number_test.rb +73 -0
  51. data/test/measurement_test.rb +121 -0
  52. data/test/module_test.rb +54 -0
  53. data/test/no_method_class_test.rb +13 -0
  54. data/test/prime.rb +58 -0
  55. data/test/prime_test.rb +13 -0
  56. data/test/printers_test.rb +71 -0
  57. data/test/recursive_test.rb +254 -0
  58. data/test/singleton_test.rb +37 -0
  59. data/test/stack_test.rb +138 -0
  60. data/test/start_stop_test.rb +95 -0
  61. data/test/test_suite.rb +23 -0
  62. data/test/thread_test.rb +159 -0
  63. data/test/unique_call_path_test.rb +206 -0
  64. metadata +124 -0
@@ -0,0 +1,123 @@
1
+ require 'rubygems'
2
+ require 'rake/gempackagetask'
3
+ require 'rake/rdoctask'
4
+ require 'rake/testtask'
5
+ require 'date'
6
+
7
+ # ------- Version ----
8
+ # Read version from header file
9
+ version_header = File.read('ext/version.h')
10
+ match = version_header.match(/RUBY_PROF_VERSION\s*["](\d.+)["]/)
11
+ raise(RuntimeError, "Could not determine RUBY_PROF_VERSION") if not match
12
+ RUBY_PROF_VERSION = match[1]
13
+
14
+
15
+ # ------- Default Package ----------
16
+ FILES = FileList[
17
+ 'Rakefile',
18
+ 'README',
19
+ 'LICENSE',
20
+ 'CHANGES',
21
+ 'bin/*',
22
+ 'doc/**/*',
23
+ 'examples/*',
24
+ 'ext/*',
25
+ 'ext/mingw/Rakefile',
26
+ 'ext/mingw/build.rake',
27
+ 'ext/vc/*.sln',
28
+ 'ext/vc/*.vcproj',
29
+ 'lib/**/*',
30
+ 'rails/**/*',
31
+ 'test/*'
32
+ ]
33
+
34
+ # Default GEM Specification
35
+ default_spec = Gem::Specification.new do |spec|
36
+ spec.name = "rdp-ruby-prof"
37
+
38
+ spec.homepage = "http://rubyforge.org/projects/ruby-prof/"
39
+ spec.summary = "Fast Ruby profiler"
40
+ spec.description = <<-EOF
41
+ ruby-prof is a fast code profiler for Ruby. It is a C extension and
42
+ therefore is many times faster than the standard Ruby profiler. It
43
+ supports both flat and graph profiles. For each method, graph profiles
44
+ show how long the method ran, which methods called it and which
45
+ methods it called. RubyProf generate both text and html and can output
46
+ it to standard out or to a file.
47
+ EOF
48
+
49
+ spec.version = RUBY_PROF_VERSION
50
+
51
+ spec.author = "Shugo Maeda and Charlie Savage"
52
+ spec.email = "shugo@ruby-lang.org and cfis@savagexi.com"
53
+ spec.platform = Gem::Platform::RUBY
54
+ spec.require_path = "lib"
55
+ spec.bindir = "bin"
56
+ spec.executables = ["ruby-prof"]
57
+ spec.extensions = ["ext/extconf.rb"]
58
+ spec.files = FILES.to_a
59
+ spec.test_files = Dir["test/test_*.rb"]
60
+
61
+
62
+ spec.required_ruby_version = '>= 1.8.4'
63
+ spec.date = DateTime.now
64
+ spec.rubyforge_project = 'ruby-prof'
65
+
66
+ # rdoc
67
+ spec.has_rdoc = true
68
+ end
69
+
70
+ # Rake task to build the default package
71
+ Rake::GemPackageTask.new(default_spec) do |pkg|
72
+ pkg.need_tar = true
73
+ #pkg.need_zip = true
74
+ end
75
+
76
+
77
+ # ------- Windows Package ----------
78
+ if RUBY_PLATFORM.match(/win32/)
79
+ binaries = (FileList['ext/mingw/*.so',
80
+ 'ext/mingw/*.dll*'])
81
+
82
+ # Windows specification
83
+ win_spec = default_spec.clone
84
+ win_spec.extensions = ['ext/mingw/Rakefile']
85
+ win_spec.platform = Gem::Platform::CURRENT
86
+ win_spec.files += binaries.to_a
87
+
88
+ # Rake task to build the windows package
89
+ Rake::GemPackageTask.new(win_spec) do |pkg|
90
+ end
91
+ end
92
+
93
+ # --------- RDoc Documentation ------
94
+ desc "Generate rdoc documentation"
95
+ Rake::RDocTask.new("rdoc") do |rdoc|
96
+ rdoc.rdoc_dir = 'doc'
97
+ rdoc.title = "ruby-prof"
98
+ # Show source inline with line numbers
99
+ rdoc.options << "--inline-source" << "--line-numbers"
100
+ # Make the readme file the start page for the generated html
101
+ rdoc.options << '--main' << 'README'
102
+ rdoc.rdoc_files.include('bin/**/*',
103
+ 'doc/*.rdoc',
104
+ 'examples/flat.txt',
105
+ 'examples/graph.txt',
106
+ 'examples/graph.html',
107
+ 'lib/**/*.rb',
108
+ 'ext/ruby_prof.c',
109
+ 'ext/version.h',
110
+ 'ext/measure_*.h',
111
+ 'README',
112
+ 'LICENSE')
113
+ end
114
+
115
+ task :default => :package
116
+
117
+ desc 'Run the ruby-prof test suite'
118
+ Rake::TestTask.new do |t|
119
+ t.libs += %w(lib ext test)
120
+ t.test_files = Dir['test/test_suite.rb']
121
+ t.verbose = true
122
+ t.warning = true
123
+ end
@@ -0,0 +1,207 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ # == Synopsis
4
+ #
5
+ # Profiles a Ruby program.
6
+ #
7
+ # == Usage
8
+ #
9
+ # ruby_prof [options] <script.rb> [--] [script-options]"
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
+ # memory - Tracks total memory size
29
+ # (requires a patched Ruby interpreter).
30
+ # gc_runs - Tracks number of garbage collection runs
31
+ # (requires a patched Ruby interpreter).
32
+ # gc_time - Tracks time spent doing garbage collection
33
+ # (requires a patched Ruby interpreter).
34
+ # --replace-progname Replace $0 when loading the .rb files.
35
+ # --specialized-instruction Turn on specialized instruction.
36
+ # -h, --help Show help message
37
+ # --version Show version
38
+ #
39
+ #
40
+ # 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]
41
+ #
42
+
43
+ require 'ostruct'
44
+ require 'optparse'
45
+ require 'ruby-prof'
46
+
47
+ options = OpenStruct.new
48
+ options.measure_mode = RubyProf::PROCESS_TIME
49
+ options.printer = RubyProf::FlatPrinter
50
+ options.min_percent = 0
51
+ options.file = nil
52
+ options.replace_prog_name = false
53
+ options.specialized_instruction = false
54
+
55
+ opts = OptionParser.new do |opts|
56
+ opts.banner = "ruby_prof #{RubyProf::VERSION}\n" +
57
+ "Usage: ruby_prof [options] <script.rb> [--] [script-options]"
58
+
59
+ opts.separator ""
60
+ opts.separator "Options:"
61
+
62
+
63
+ opts.on('-p printer', '--printer=printer', [:flat, :graph, :graph_html, :call_tree],
64
+ 'Select a printer:',
65
+ ' flat - Prints a flat profile as text (default).',
66
+ ' graph - Prints a graph profile as text.',
67
+ ' graph_html - Prints a graph profile as html.',
68
+ ' call_tree - format for KCacheGrind' ) do |printer|
69
+
70
+
71
+ case printer
72
+ when :flat
73
+ options.printer = RubyProf::FlatPrinter
74
+ when :graph
75
+ options.printer = RubyProf::GraphPrinter
76
+ when :graph_html
77
+ options.printer = RubyProf::GraphHtmlPrinter
78
+ when :call_tree
79
+ options.printer = RubyProf::CallTreePrinter
80
+ end
81
+ end
82
+
83
+ opts.on('-m min_percent', '--min_percent=min_percent', Float,
84
+ 'The minimum percent a method must take before ',
85
+ ' being included in output reports.',
86
+ ' this option is not supported for call tree.') do |min_percent|
87
+ options.min_percent = min_percent
88
+ end
89
+
90
+ opts.on('-f path', '--file=path',
91
+ 'Output results to a file instead of standard out.') do |file|
92
+ options.file = file
93
+ end
94
+
95
+ opts.on('--mode=measure_mode',
96
+ [:process, :wall, :cpu, :allocations, :memory, :gc_runs, :gc_time],
97
+ 'Select what ruby-prof should measure:',
98
+ ' process - Process time (default).',
99
+ ' wall - Wall time.',
100
+ ' cpu - CPU time (Pentium and PowerPCs only).',
101
+ ' allocations - Object allocations (requires patched Ruby interpreter).',
102
+ ' memory - Allocated memory in KB (requires patched Ruby interpreter).',
103
+ ' gc_runs - Number of garbage collections (requires patched Ruby interpreter).',
104
+ ' gc_time - Time spent in garbage collection (requires patched Ruby interpreter).') do |measure_mode|
105
+
106
+ case measure_mode
107
+ when :process
108
+ options.measure_mode = RubyProf::PROCESS_TIME
109
+ when :wall
110
+ options.measure_mode = RubyProf::WALL_TIME
111
+ when :cpu
112
+ options.measure_mode = RubyProf::CPU_TIME
113
+ when :allocations
114
+ options.measure_mode = RubyProf::ALLOCATIONS
115
+ when :memory
116
+ options.measure_mode = RubyProf::MEMORY
117
+ when :gc_runs
118
+ options.measure_mode = RubyProf::GC_RUNS
119
+ when :gc_time
120
+ options.measure_mode = RubyProf::GC_TIME
121
+ end
122
+ end
123
+
124
+ opts.on("--replace-progname", "Replace $0 when loading the .rb files.") do
125
+ options.replace_prog_name = true
126
+ end
127
+
128
+ if defined?(VM)
129
+ opts.on("--specialized-instruction", "Turn on specified instruction.") do
130
+ options.specialized_instruction = true
131
+ end
132
+ end
133
+
134
+ opts.on_tail("-h", "--help", "Show help message") do
135
+ puts opts
136
+ exit
137
+ end
138
+
139
+ opts.on_tail("-v", "--version", "Show version") do
140
+ puts "ruby_prof " + RubyProf::VERSION
141
+ exit
142
+ end
143
+ end
144
+
145
+ begin
146
+ opts.parse! ARGV
147
+ rescue OptionParser::InvalidOption, OptionParser::InvalidArgument,
148
+ OptionParser::MissingArgument => e
149
+ puts opts
150
+ puts
151
+ puts e.message
152
+ exit(-1)
153
+ end
154
+
155
+ # Make sure the user specified at least one file
156
+ if ARGV.length < 1
157
+ puts opts
158
+ puts ""
159
+ puts "Must specify a script to run"
160
+ exit(-1)
161
+ end
162
+
163
+
164
+ # Install at_exit handler. It is important that we do this
165
+ # before loading the scripts so our at_exit handler run
166
+ # *after* any other one that will be installed.
167
+
168
+ at_exit {
169
+ # Stop profiling
170
+ result = RubyProf.stop
171
+
172
+ # Create a printer
173
+ printer = options.printer.new(result)
174
+
175
+ # Get output
176
+ if options.file
177
+ File.open(options.file, 'w') do |file|
178
+ printer.print(file, {:min_percent => options.min_percent})
179
+ end
180
+ else
181
+ # Print out results
182
+ printer.print(STDOUT, {:min_percent => options.min_percent})
183
+ end
184
+ }
185
+
186
+ # Now set measure mode
187
+ RubyProf.measure_mode = options.measure_mode
188
+
189
+ # Set VM compile option
190
+ if defined?(VM)
191
+ VM::InstructionSequence.compile_option = {
192
+ :trace_instruction => true,
193
+ :specialized_instruction => options.specialized_instruction
194
+ }
195
+ end
196
+
197
+ # Get the script we will execute
198
+ script = ARGV.shift
199
+ if options.replace_prog_name
200
+ $0 = File.expand_path(script)
201
+ end
202
+
203
+ # Start profiling
204
+ RubyProf.start
205
+
206
+ # Load the script
207
+ load script
@@ -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>