ruby-prof 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGES +532 -0
- data/LICENSE +25 -0
- data/README.rdoc +5 -0
- data/Rakefile +110 -0
- data/bin/ruby-prof +380 -0
- data/bin/ruby-prof-check-trace +45 -0
- data/ext/ruby_prof/extconf.rb +36 -0
- data/ext/ruby_prof/rp_allocation.c +279 -0
- data/ext/ruby_prof/rp_allocation.h +31 -0
- data/ext/ruby_prof/rp_call_info.c +271 -0
- data/ext/ruby_prof/rp_call_info.h +35 -0
- data/ext/ruby_prof/rp_measure_allocations.c +52 -0
- data/ext/ruby_prof/rp_measure_memory.c +42 -0
- data/ext/ruby_prof/rp_measure_process_time.c +67 -0
- data/ext/ruby_prof/rp_measure_wall_time.c +62 -0
- data/ext/ruby_prof/rp_measurement.c +230 -0
- data/ext/ruby_prof/rp_measurement.h +50 -0
- data/ext/ruby_prof/rp_method.c +630 -0
- data/ext/ruby_prof/rp_method.h +70 -0
- data/ext/ruby_prof/rp_profile.c +895 -0
- data/ext/ruby_prof/rp_profile.h +37 -0
- data/ext/ruby_prof/rp_stack.c +196 -0
- data/ext/ruby_prof/rp_stack.h +56 -0
- data/ext/ruby_prof/rp_thread.c +337 -0
- data/ext/ruby_prof/rp_thread.h +36 -0
- data/ext/ruby_prof/ruby_prof.c +48 -0
- data/ext/ruby_prof/ruby_prof.h +17 -0
- data/ext/ruby_prof/vc/ruby_prof.sln +31 -0
- data/ext/ruby_prof/vc/ruby_prof.vcxproj +143 -0
- data/lib/ruby-prof.rb +52 -0
- data/lib/ruby-prof/assets/call_stack_printer.html.erb +713 -0
- data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
- data/lib/ruby-prof/assets/graph_printer.html.erb +356 -0
- data/lib/ruby-prof/call_info.rb +57 -0
- data/lib/ruby-prof/call_info_visitor.rb +38 -0
- data/lib/ruby-prof/compatibility.rb +109 -0
- data/lib/ruby-prof/exclude_common_methods.rb +198 -0
- data/lib/ruby-prof/measurement.rb +14 -0
- data/lib/ruby-prof/method_info.rb +90 -0
- data/lib/ruby-prof/printers/abstract_printer.rb +127 -0
- data/lib/ruby-prof/printers/call_info_printer.rb +51 -0
- data/lib/ruby-prof/printers/call_stack_printer.rb +182 -0
- data/lib/ruby-prof/printers/call_tree_printer.rb +151 -0
- data/lib/ruby-prof/printers/dot_printer.rb +132 -0
- data/lib/ruby-prof/printers/flat_printer.rb +52 -0
- data/lib/ruby-prof/printers/graph_html_printer.rb +63 -0
- data/lib/ruby-prof/printers/graph_printer.rb +114 -0
- data/lib/ruby-prof/printers/multi_printer.rb +127 -0
- data/lib/ruby-prof/profile.rb +33 -0
- data/lib/ruby-prof/rack.rb +171 -0
- data/lib/ruby-prof/task.rb +147 -0
- data/lib/ruby-prof/thread.rb +35 -0
- data/lib/ruby-prof/version.rb +3 -0
- data/lib/unprof.rb +10 -0
- data/ruby-prof.gemspec +58 -0
- data/test/abstract_printer_test.rb +26 -0
- data/test/alias_test.rb +129 -0
- data/test/basic_test.rb +129 -0
- data/test/call_info_visitor_test.rb +31 -0
- data/test/duplicate_names_test.rb +32 -0
- data/test/dynamic_method_test.rb +53 -0
- data/test/enumerable_test.rb +21 -0
- data/test/exceptions_test.rb +24 -0
- data/test/exclude_methods_test.rb +146 -0
- data/test/exclude_threads_test.rb +53 -0
- data/test/fiber_test.rb +73 -0
- data/test/gc_test.rb +96 -0
- data/test/line_number_test.rb +161 -0
- data/test/marshal_test.rb +119 -0
- data/test/measure_allocations.rb +30 -0
- data/test/measure_allocations_test.rb +385 -0
- data/test/measure_allocations_trace_test.rb +385 -0
- data/test/measure_memory_trace_test.rb +756 -0
- data/test/measure_process_time_test.rb +849 -0
- data/test/measure_times.rb +54 -0
- data/test/measure_wall_time_test.rb +459 -0
- data/test/multi_printer_test.rb +71 -0
- data/test/no_method_class_test.rb +15 -0
- data/test/parser_timings.rb +24 -0
- data/test/pause_resume_test.rb +166 -0
- data/test/prime.rb +56 -0
- data/test/printer_call_stack_test.rb +28 -0
- data/test/printer_call_tree_test.rb +31 -0
- data/test/printer_flat_test.rb +68 -0
- data/test/printer_graph_html_test.rb +60 -0
- data/test/printer_graph_test.rb +41 -0
- data/test/printers_test.rb +141 -0
- data/test/printing_recursive_graph_test.rb +81 -0
- data/test/rack_test.rb +157 -0
- data/test/recursive_test.rb +210 -0
- data/test/singleton_test.rb +38 -0
- data/test/stack_printer_test.rb +64 -0
- data/test/start_stop_test.rb +109 -0
- data/test/test_helper.rb +24 -0
- data/test/thread_test.rb +144 -0
- data/test/unique_call_path_test.rb +190 -0
- data/test/yarv_test.rb +56 -0
- metadata +191 -0
data/test/thread_test.rb
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
require File.expand_path('../test_helper', __FILE__)
|
5
|
+
require 'timeout'
|
6
|
+
require 'benchmark'
|
7
|
+
|
8
|
+
# -- Tests ----
|
9
|
+
class ThreadTest < TestCase
|
10
|
+
def setup
|
11
|
+
# Need to use wall time for this test due to the sleep calls
|
12
|
+
RubyProf::measure_mode = RubyProf::WALL_TIME
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_thread_count
|
16
|
+
RubyProf.start
|
17
|
+
|
18
|
+
thread = Thread.new do
|
19
|
+
sleep(1)
|
20
|
+
end
|
21
|
+
|
22
|
+
thread.join
|
23
|
+
result = RubyProf.stop
|
24
|
+
assert_equal(2, result.threads.length)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_thread_identity
|
28
|
+
RubyProf.start
|
29
|
+
sleep_thread = Thread.new do
|
30
|
+
sleep(1)
|
31
|
+
end
|
32
|
+
sleep_thread.join
|
33
|
+
result = RubyProf.stop
|
34
|
+
|
35
|
+
thread_ids = result.threads.map {|thread| thread.id}.sort
|
36
|
+
threads = [Thread.current, sleep_thread]
|
37
|
+
assert_equal(2, result.threads.length)
|
38
|
+
|
39
|
+
assert(thread_ids.include?(threads[0].object_id))
|
40
|
+
assert(thread_ids.include?(threads[1].object_id))
|
41
|
+
|
42
|
+
assert_instance_of(Thread, ObjectSpace._id2ref(thread_ids[0]))
|
43
|
+
assert(threads.include?(ObjectSpace._id2ref(thread_ids[0])))
|
44
|
+
|
45
|
+
assert_instance_of(Thread, ObjectSpace._id2ref(thread_ids[1]))
|
46
|
+
assert(threads.include?(ObjectSpace._id2ref(thread_ids[1])))
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_thread_timings
|
50
|
+
RubyProf.start
|
51
|
+
thread = Thread.new do
|
52
|
+
sleep 0
|
53
|
+
# force it to hit thread.join, below, first
|
54
|
+
# thus forcing sleep(1), below, to be counted as (wall) self_time
|
55
|
+
# since we currently count time "in some other thread" as self.wait_time
|
56
|
+
# for whatever reason
|
57
|
+
sleep(1)
|
58
|
+
end
|
59
|
+
thread.join
|
60
|
+
result = RubyProf.stop
|
61
|
+
|
62
|
+
# Check background thread
|
63
|
+
assert_equal(2, result.threads.length)
|
64
|
+
|
65
|
+
rp_thread = result.threads.detect {|t| t.id == thread.object_id}
|
66
|
+
methods = rp_thread.methods.sort.reverse
|
67
|
+
# fails on travis. why?
|
68
|
+
# expected_methods = ["ThreadTest#test_thread_timings", "Kernel#sleep"]
|
69
|
+
# assert_equal(expected_methods, methods.map(&:full_name))
|
70
|
+
|
71
|
+
method = methods[0]
|
72
|
+
assert_equal('ThreadTest#test_thread_timings', method.full_name)
|
73
|
+
assert_equal(1, method.called)
|
74
|
+
assert_in_delta(1, method.total_time, 0.05)
|
75
|
+
assert_in_delta(0, method.self_time, 0.05)
|
76
|
+
assert_in_delta(0, method.wait_time, 0.05)
|
77
|
+
assert_in_delta(1, method.children_time, 0.05)
|
78
|
+
assert_equal(1, method.callers.length)
|
79
|
+
|
80
|
+
method = methods[1]
|
81
|
+
assert_equal('Kernel#sleep', method.full_name)
|
82
|
+
assert_equal(2, method.called)
|
83
|
+
assert_in_delta(1, method.total_time, 0.05)
|
84
|
+
assert_in_delta(1.0, method.self_time, 0.05)
|
85
|
+
assert_in_delta(0, method.wait_time, 0.05)
|
86
|
+
assert_in_delta(0, method.children_time, 0.05)
|
87
|
+
|
88
|
+
assert_equal(1, method.callers.length)
|
89
|
+
assert_equal(0, method.callees.length)
|
90
|
+
|
91
|
+
# Check foreground thread
|
92
|
+
rp_thread = result.threads.detect {|athread| athread.id == Thread.current.object_id}
|
93
|
+
methods = rp_thread.methods.sort.reverse
|
94
|
+
assert_equal(4, methods.length)
|
95
|
+
methods = methods.sort.reverse
|
96
|
+
|
97
|
+
method = methods[0]
|
98
|
+
assert_equal('ThreadTest#test_thread_timings', method.full_name)
|
99
|
+
# the sub calls to Object#new, when popped,
|
100
|
+
# cause the parent frame to be created for method #test_thread_timings, which means a +1 when it's popped in the end
|
101
|
+
# xxxx a test that shows it the other way, too (never creates parent frame--if that's even possible)
|
102
|
+
assert_equal(1, method.called)
|
103
|
+
assert_in_delta(1, method.total_time, 0.05)
|
104
|
+
assert_in_delta(0, method.self_time, 0.05)
|
105
|
+
assert_in_delta(0, method.wait_time, 0.05)
|
106
|
+
assert_in_delta(1, method.children_time, 0.05)
|
107
|
+
|
108
|
+
assert_equal(1, method.callers.length)
|
109
|
+
assert_equal(2, method.callees.length)
|
110
|
+
|
111
|
+
method = methods[1]
|
112
|
+
assert_equal('Thread#join', method.full_name)
|
113
|
+
assert_equal(1, method.called)
|
114
|
+
assert_in_delta(1, method.total_time, 0.05)
|
115
|
+
assert_in_delta(0, method.self_time, 0.05)
|
116
|
+
assert_in_delta(1.0, method.wait_time, 0.05)
|
117
|
+
assert_in_delta(0, method.children_time, 0.05)
|
118
|
+
|
119
|
+
assert_equal(1, method.callers.length)
|
120
|
+
assert_equal(0, method.callees.length)
|
121
|
+
|
122
|
+
method = methods[2]
|
123
|
+
assert_equal('<Class::Thread>#new', method.full_name)
|
124
|
+
assert_equal(1, method.called)
|
125
|
+
assert_in_delta(0, method.total_time, 0.05)
|
126
|
+
assert_in_delta(0, method.self_time, 0.05)
|
127
|
+
assert_in_delta(0, method.wait_time, 0.05)
|
128
|
+
assert_in_delta(0, method.children_time, 0.05)
|
129
|
+
|
130
|
+
assert_equal(1, method.callers.length)
|
131
|
+
assert_equal(1, method.callees.length)
|
132
|
+
|
133
|
+
method = methods[3]
|
134
|
+
assert_equal('Thread#initialize', method.full_name)
|
135
|
+
assert_equal(1, method.called)
|
136
|
+
assert_in_delta(0, method.total_time, 0.05)
|
137
|
+
assert_in_delta(0, method.self_time, 0.05)
|
138
|
+
assert_in_delta(0, method.wait_time, 0.05)
|
139
|
+
assert_in_delta(0, method.children_time, 0.05)
|
140
|
+
|
141
|
+
assert_equal(1, method.callers.length)
|
142
|
+
assert_equal(0, method.callees.length)
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,190 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
require File.expand_path('../test_helper', __FILE__)
|
5
|
+
|
6
|
+
class UniqueCallPath
|
7
|
+
def method_a(i)
|
8
|
+
if i==1
|
9
|
+
method_b
|
10
|
+
else
|
11
|
+
method_c
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def method_b
|
16
|
+
method_c
|
17
|
+
end
|
18
|
+
|
19
|
+
def method_c
|
20
|
+
end
|
21
|
+
|
22
|
+
def method_k(i)
|
23
|
+
method_a(i)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
# -- Tests ----
|
29
|
+
class UniqueCallPathTest < TestCase
|
30
|
+
def test_root_method
|
31
|
+
unique_call_path = UniqueCallPath.new
|
32
|
+
|
33
|
+
result = RubyProf.profile do
|
34
|
+
unique_call_path.method_a(1)
|
35
|
+
end
|
36
|
+
|
37
|
+
root_methods = Array.new
|
38
|
+
result.threads.each do |thread|
|
39
|
+
thread.methods.each do | m |
|
40
|
+
if m.root?
|
41
|
+
root_methods.push(m)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
assert_equal(1, root_methods.length)
|
47
|
+
assert_equal("UniqueCallPathTest#test_root_method", root_methods[0].full_name)
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_root_children
|
51
|
+
unique_call_path = UniqueCallPath.new
|
52
|
+
|
53
|
+
result = RubyProf.profile do
|
54
|
+
unique_call_path.method_a(1)
|
55
|
+
unique_call_path.method_k(2)
|
56
|
+
end
|
57
|
+
|
58
|
+
root_methods = Array.new
|
59
|
+
result.threads.each do |thread|
|
60
|
+
thread.methods.each do | m |
|
61
|
+
if m.root?
|
62
|
+
root_methods.push(m)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
assert_equal(1, root_methods.length)
|
68
|
+
|
69
|
+
root_children = Array.new
|
70
|
+
root_methods[0].callees.each do | c |
|
71
|
+
if c.parent.eql?(root_methods[0])
|
72
|
+
root_children.push(c)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
children = root_children.sort do |c1, c2|
|
77
|
+
c1.target.full_name <=> c2.target.full_name
|
78
|
+
end
|
79
|
+
|
80
|
+
assert_equal(2, children.length)
|
81
|
+
assert_equal("UniqueCallPath#method_a", children[0].target.full_name)
|
82
|
+
assert_equal("UniqueCallPath#method_k", children[1].target.full_name)
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_children_of
|
86
|
+
unique_call_path = UniqueCallPath.new
|
87
|
+
|
88
|
+
result = RubyProf.profile do
|
89
|
+
unique_call_path.method_a(1)
|
90
|
+
unique_call_path.method_k(2)
|
91
|
+
end
|
92
|
+
|
93
|
+
root_methods = Array.new
|
94
|
+
result.threads.each do |thread|
|
95
|
+
thread.methods.each do | m |
|
96
|
+
if m.root?
|
97
|
+
root_methods.push(m)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
assert_equal(1, root_methods.length)
|
103
|
+
method = root_methods[0]
|
104
|
+
assert_equal('UniqueCallPathTest#test_children_of', method.full_name)
|
105
|
+
|
106
|
+
call_info_a = root_methods[0].callees.detect do |call_info|
|
107
|
+
call_info.target.full_name == "UniqueCallPath#method_a"
|
108
|
+
end
|
109
|
+
refute_nil(call_info_a)
|
110
|
+
|
111
|
+
children_of_a = Array.new
|
112
|
+
|
113
|
+
call_info_a.target.callees.each do | c |
|
114
|
+
if c.parent.eql?(call_info_a)
|
115
|
+
children_of_a.push(c)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
assert_equal(2, call_info_a.target.callees.length)
|
120
|
+
|
121
|
+
children_of_a = children_of_a.sort do |c1, c2|
|
122
|
+
c1.target.full_name <=> c2.target.full_name
|
123
|
+
end
|
124
|
+
|
125
|
+
assert_equal(0, children_of_a.length)
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_id2ref
|
129
|
+
unique_call_path = UniqueCallPath.new
|
130
|
+
|
131
|
+
result = RubyProf.profile do
|
132
|
+
unique_call_path.method_a(1)
|
133
|
+
end
|
134
|
+
|
135
|
+
root_methods = Array.new
|
136
|
+
result.threads.each do |thread|
|
137
|
+
thread.methods.each do | m |
|
138
|
+
if m.root?
|
139
|
+
root_methods.push(m)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
child = root_methods[0].callees[0]
|
145
|
+
refute_equal(0, child.object_id)
|
146
|
+
#assert_equal(RubyProf::CallInfo.id2ref(child.id).target.full_name, child.target.full_name)
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_unique_path
|
150
|
+
unique_call_path = UniqueCallPath.new
|
151
|
+
|
152
|
+
result = RubyProf.profile do
|
153
|
+
unique_call_path.method_a(1)
|
154
|
+
unique_call_path.method_k(1)
|
155
|
+
end
|
156
|
+
|
157
|
+
root_methods = Array.new
|
158
|
+
result.threads.each do |thread|
|
159
|
+
thread.methods.each do | m |
|
160
|
+
if m.root?
|
161
|
+
root_methods.push(m)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
assert_equal(1, root_methods.length)
|
167
|
+
|
168
|
+
call_info_a = root_methods[0].callees.detect do |call_info|
|
169
|
+
call_info.target.full_name == "UniqueCallPath#method_a"
|
170
|
+
end
|
171
|
+
refute_nil(call_info_a)
|
172
|
+
|
173
|
+
children_of_a = Array.new
|
174
|
+
call_info_a.target.callees.each do |c|
|
175
|
+
if c.parent.eql?(call_info_a.target)
|
176
|
+
children_of_a.push(c)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
assert_equal(1, call_info_a.target.callees.length)
|
181
|
+
|
182
|
+
children_of_a = children_of_a.sort do |c1, c2|
|
183
|
+
c1.target.full_name <=> c2.target.full_name
|
184
|
+
end
|
185
|
+
|
186
|
+
assert_equal(1, children_of_a.length)
|
187
|
+
assert_equal(2, children_of_a[0].called)
|
188
|
+
assert_equal("UniqueCallPath#method_b", children_of_a[0].target.full_name)
|
189
|
+
end
|
190
|
+
end
|
data/test/yarv_test.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
require File.expand_path('../test_helper', __FILE__)
|
5
|
+
|
6
|
+
# tests for bugs reported by users
|
7
|
+
class BugsTest < TestCase
|
8
|
+
def setup
|
9
|
+
RubyProf::measure_mode = RubyProf::WALL_TIME
|
10
|
+
define_methods
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_array_push_unoptimized
|
14
|
+
a = nil
|
15
|
+
result = RubyProf.profile do
|
16
|
+
a = self.array_push_unoptimized
|
17
|
+
end
|
18
|
+
assert_equal 2, a.length
|
19
|
+
assert_equal ["BugsTest#test_array_push_unoptimized", "BugsTest#array_push_unoptimized", 'Array#<<', "Array#push"], result.threads.first.methods.map(&:full_name)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_array_push_optimized
|
23
|
+
a = nil
|
24
|
+
result = RubyProf.profile do
|
25
|
+
a = self.array_push_optimized
|
26
|
+
end
|
27
|
+
assert_equal 2, a.length
|
28
|
+
assert_equal ["BugsTest#test_array_push_optimized", "BugsTest#array_push_optimized", "Array#push"], result.threads.first.methods.map(&:full_name)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def define_methods
|
34
|
+
return if respond_to?(:array_push_optimized)
|
35
|
+
old_compile_option = RubyVM::InstructionSequence.compile_option
|
36
|
+
RubyVM::InstructionSequence.compile_option = {
|
37
|
+
:trace_instruction => true,
|
38
|
+
:specialized_instruction => false
|
39
|
+
}
|
40
|
+
self.class.class_eval <<-"EOM"
|
41
|
+
def array_push_unoptimized
|
42
|
+
a = []
|
43
|
+
a << 1
|
44
|
+
a.push 2
|
45
|
+
end
|
46
|
+
EOM
|
47
|
+
RubyVM::InstructionSequence.compile_option = old_compile_option
|
48
|
+
self.class.class_eval <<-"EOM"
|
49
|
+
def array_push_optimized
|
50
|
+
a = []
|
51
|
+
a << 1
|
52
|
+
a.push 2
|
53
|
+
end
|
54
|
+
EOM
|
55
|
+
end
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-prof
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shugo Maeda, Charlie Savage, Roger Pack, Stefan Kaes
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-12-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: minitest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: |
|
56
|
+
ruby-prof is a fast code profiler for Ruby. It is a C extension and
|
57
|
+
therefore is many times faster than the standard Ruby profiler. It
|
58
|
+
supports both flat and graph profiles. For each method, graph profiles
|
59
|
+
show how long the method ran, which methods called it and which
|
60
|
+
methods it called. RubyProf generate both text and html and can output
|
61
|
+
it to standard out or to a file.
|
62
|
+
email: shugo@ruby-lang.org, cfis@savagexi.com, rogerdpack@gmail.com, skaes@railsexpress.de
|
63
|
+
executables:
|
64
|
+
- ruby-prof
|
65
|
+
- ruby-prof-check-trace
|
66
|
+
extensions:
|
67
|
+
- ext/ruby_prof/extconf.rb
|
68
|
+
extra_rdoc_files: []
|
69
|
+
files:
|
70
|
+
- CHANGES
|
71
|
+
- LICENSE
|
72
|
+
- README.rdoc
|
73
|
+
- Rakefile
|
74
|
+
- bin/ruby-prof
|
75
|
+
- bin/ruby-prof-check-trace
|
76
|
+
- ext/ruby_prof/extconf.rb
|
77
|
+
- ext/ruby_prof/rp_allocation.c
|
78
|
+
- ext/ruby_prof/rp_allocation.h
|
79
|
+
- ext/ruby_prof/rp_call_info.c
|
80
|
+
- ext/ruby_prof/rp_call_info.h
|
81
|
+
- ext/ruby_prof/rp_measure_allocations.c
|
82
|
+
- ext/ruby_prof/rp_measure_memory.c
|
83
|
+
- ext/ruby_prof/rp_measure_process_time.c
|
84
|
+
- ext/ruby_prof/rp_measure_wall_time.c
|
85
|
+
- ext/ruby_prof/rp_measurement.c
|
86
|
+
- ext/ruby_prof/rp_measurement.h
|
87
|
+
- ext/ruby_prof/rp_method.c
|
88
|
+
- ext/ruby_prof/rp_method.h
|
89
|
+
- ext/ruby_prof/rp_profile.c
|
90
|
+
- ext/ruby_prof/rp_profile.h
|
91
|
+
- ext/ruby_prof/rp_stack.c
|
92
|
+
- ext/ruby_prof/rp_stack.h
|
93
|
+
- ext/ruby_prof/rp_thread.c
|
94
|
+
- ext/ruby_prof/rp_thread.h
|
95
|
+
- ext/ruby_prof/ruby_prof.c
|
96
|
+
- ext/ruby_prof/ruby_prof.h
|
97
|
+
- ext/ruby_prof/vc/ruby_prof.sln
|
98
|
+
- ext/ruby_prof/vc/ruby_prof.vcxproj
|
99
|
+
- lib/ruby-prof.rb
|
100
|
+
- lib/ruby-prof/assets/call_stack_printer.html.erb
|
101
|
+
- lib/ruby-prof/assets/call_stack_printer.png
|
102
|
+
- lib/ruby-prof/assets/graph_printer.html.erb
|
103
|
+
- lib/ruby-prof/call_info.rb
|
104
|
+
- lib/ruby-prof/call_info_visitor.rb
|
105
|
+
- lib/ruby-prof/compatibility.rb
|
106
|
+
- lib/ruby-prof/exclude_common_methods.rb
|
107
|
+
- lib/ruby-prof/measurement.rb
|
108
|
+
- lib/ruby-prof/method_info.rb
|
109
|
+
- lib/ruby-prof/printers/abstract_printer.rb
|
110
|
+
- lib/ruby-prof/printers/call_info_printer.rb
|
111
|
+
- lib/ruby-prof/printers/call_stack_printer.rb
|
112
|
+
- lib/ruby-prof/printers/call_tree_printer.rb
|
113
|
+
- lib/ruby-prof/printers/dot_printer.rb
|
114
|
+
- lib/ruby-prof/printers/flat_printer.rb
|
115
|
+
- lib/ruby-prof/printers/graph_html_printer.rb
|
116
|
+
- lib/ruby-prof/printers/graph_printer.rb
|
117
|
+
- lib/ruby-prof/printers/multi_printer.rb
|
118
|
+
- lib/ruby-prof/profile.rb
|
119
|
+
- lib/ruby-prof/rack.rb
|
120
|
+
- lib/ruby-prof/task.rb
|
121
|
+
- lib/ruby-prof/thread.rb
|
122
|
+
- lib/ruby-prof/version.rb
|
123
|
+
- lib/unprof.rb
|
124
|
+
- ruby-prof.gemspec
|
125
|
+
- test/abstract_printer_test.rb
|
126
|
+
- test/alias_test.rb
|
127
|
+
- test/basic_test.rb
|
128
|
+
- test/call_info_visitor_test.rb
|
129
|
+
- test/duplicate_names_test.rb
|
130
|
+
- test/dynamic_method_test.rb
|
131
|
+
- test/enumerable_test.rb
|
132
|
+
- test/exceptions_test.rb
|
133
|
+
- test/exclude_methods_test.rb
|
134
|
+
- test/exclude_threads_test.rb
|
135
|
+
- test/fiber_test.rb
|
136
|
+
- test/gc_test.rb
|
137
|
+
- test/line_number_test.rb
|
138
|
+
- test/marshal_test.rb
|
139
|
+
- test/measure_allocations.rb
|
140
|
+
- test/measure_allocations_test.rb
|
141
|
+
- test/measure_allocations_trace_test.rb
|
142
|
+
- test/measure_memory_trace_test.rb
|
143
|
+
- test/measure_process_time_test.rb
|
144
|
+
- test/measure_times.rb
|
145
|
+
- test/measure_wall_time_test.rb
|
146
|
+
- test/multi_printer_test.rb
|
147
|
+
- test/no_method_class_test.rb
|
148
|
+
- test/parser_timings.rb
|
149
|
+
- test/pause_resume_test.rb
|
150
|
+
- test/prime.rb
|
151
|
+
- test/printer_call_stack_test.rb
|
152
|
+
- test/printer_call_tree_test.rb
|
153
|
+
- test/printer_flat_test.rb
|
154
|
+
- test/printer_graph_html_test.rb
|
155
|
+
- test/printer_graph_test.rb
|
156
|
+
- test/printers_test.rb
|
157
|
+
- test/printing_recursive_graph_test.rb
|
158
|
+
- test/rack_test.rb
|
159
|
+
- test/recursive_test.rb
|
160
|
+
- test/singleton_test.rb
|
161
|
+
- test/stack_printer_test.rb
|
162
|
+
- test/start_stop_test.rb
|
163
|
+
- test/test_helper.rb
|
164
|
+
- test/thread_test.rb
|
165
|
+
- test/unique_call_path_test.rb
|
166
|
+
- test/yarv_test.rb
|
167
|
+
homepage: https://github.com/ruby-prof/ruby-prof
|
168
|
+
licenses:
|
169
|
+
- BSD-2-Clause
|
170
|
+
metadata: {}
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 2.4.0
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
requirements: []
|
186
|
+
rubygems_version: 3.0.6
|
187
|
+
signing_key:
|
188
|
+
specification_version: 4
|
189
|
+
summary: Fast Ruby profiler
|
190
|
+
test_files:
|
191
|
+
- test/test_helper.rb
|