ruby-prof 1.7.0 → 2.0.0
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.
- checksums.yaml +4 -4
- data/{CHANGES → CHANGELOG.md} +120 -174
- data/README.md +5 -5
- data/bin/ruby-prof +1 -4
- data/docs/advanced-usage.md +132 -0
- data/docs/alternatives.md +98 -0
- data/docs/architecture.md +122 -0
- data/docs/best-practices.md +27 -0
- data/docs/getting-started.md +130 -0
- data/docs/history.md +11 -0
- data/docs/index.md +45 -0
- data/docs/profiling-rails.md +64 -0
- data/docs/public/examples/example.rb +33 -0
- data/docs/public/examples/generate_reports.rb +92 -0
- data/docs/public/examples/reports/call_info.txt +27 -0
- data/docs/public/examples/reports/call_stack.html +835 -0
- data/docs/public/examples/reports/callgrind.out +150 -0
- data/docs/public/examples/reports/flame_graph.html +408 -0
- data/docs/public/examples/reports/flat.txt +45 -0
- data/docs/public/examples/reports/graph.dot +129 -0
- data/docs/public/examples/reports/graph.html +1319 -0
- data/docs/public/examples/reports/graph.txt +100 -0
- data/docs/public/examples/reports/graphviz_viewer.html +1 -0
- data/docs/public/images/call_stack.png +0 -0
- data/docs/public/images/class_diagram.png +0 -0
- data/docs/public/images/dot_printer.png +0 -0
- data/docs/public/images/flame_graph.png +0 -0
- data/docs/public/images/flat.png +0 -0
- data/docs/public/images/graph.png +0 -0
- data/docs/public/images/graph_html.png +0 -0
- data/docs/public/images/ruby-prof-logo.svg +1 -0
- data/docs/reports.md +150 -0
- data/docs/stylesheets/extra.css +80 -0
- data/ext/ruby_prof/extconf.rb +23 -22
- data/ext/ruby_prof/rp_allocation.c +0 -15
- data/ext/ruby_prof/rp_allocation.h +29 -33
- data/ext/ruby_prof/rp_call_tree.c +3 -0
- data/ext/ruby_prof/rp_call_tree.h +1 -4
- data/ext/ruby_prof/rp_call_trees.c +296 -296
- data/ext/ruby_prof/rp_call_trees.h +25 -28
- data/ext/ruby_prof/rp_measure_allocations.c +47 -47
- data/ext/ruby_prof/rp_measure_process_time.c +64 -66
- data/ext/ruby_prof/rp_measure_wall_time.c +52 -64
- data/ext/ruby_prof/rp_measurement.c +0 -5
- data/ext/ruby_prof/rp_measurement.h +49 -53
- data/ext/ruby_prof/rp_method.c +554 -562
- data/ext/ruby_prof/rp_method.h +1 -4
- data/ext/ruby_prof/rp_profile.c +1 -1
- data/ext/ruby_prof/rp_profile.h +1 -5
- data/ext/ruby_prof/rp_stack.c +212 -212
- data/ext/ruby_prof/rp_stack.h +50 -53
- data/ext/ruby_prof/rp_thread.h +1 -4
- data/ext/ruby_prof/ruby_prof.c +50 -50
- data/ext/ruby_prof/ruby_prof.h +4 -6
- data/ext/ruby_prof/vc/ruby_prof.vcxproj +7 -8
- data/lib/ruby-prof/assets/call_stack_printer.html.erb +746 -711
- data/lib/ruby-prof/assets/flame_graph_printer.html.erb +412 -0
- data/lib/ruby-prof/assets/graph_printer.html.erb +355 -355
- data/lib/ruby-prof/call_tree.rb +57 -57
- data/lib/ruby-prof/call_tree_visitor.rb +36 -36
- data/lib/ruby-prof/exclude_common_methods.rb +204 -204
- data/lib/ruby-prof/measurement.rb +17 -17
- data/lib/ruby-prof/printers/abstract_printer.rb +142 -138
- data/lib/ruby-prof/printers/call_info_printer.rb +53 -53
- data/lib/ruby-prof/printers/call_stack_printer.rb +168 -180
- data/lib/ruby-prof/printers/call_tree_printer.rb +132 -145
- data/lib/ruby-prof/printers/dot_printer.rb +177 -132
- data/lib/ruby-prof/printers/flame_graph_printer.rb +79 -0
- data/lib/ruby-prof/printers/flat_printer.rb +52 -52
- data/lib/ruby-prof/printers/graph_html_printer.rb +62 -63
- data/lib/ruby-prof/printers/graph_printer.rb +112 -113
- data/lib/ruby-prof/printers/multi_printer.rb +134 -127
- data/lib/ruby-prof/profile.rb +13 -0
- data/lib/ruby-prof/rack.rb +114 -105
- data/lib/ruby-prof/task.rb +147 -147
- data/lib/ruby-prof/thread.rb +20 -20
- data/lib/ruby-prof/version.rb +3 -3
- data/lib/ruby-prof.rb +50 -52
- data/lib/unprof.rb +10 -10
- data/ruby-prof.gemspec +66 -64
- data/test/abstract_printer_test.rb +25 -27
- data/test/alias_test.rb +203 -117
- data/test/call_tree_builder.rb +126 -126
- data/test/call_tree_visitor_test.rb +27 -27
- data/test/call_trees_test.rb +66 -66
- data/test/duplicate_names_test.rb +32 -32
- data/test/dynamic_method_test.rb +50 -62
- data/test/enumerable_test.rb +23 -21
- data/test/exceptions_test.rb +24 -24
- data/test/exclude_methods_test.rb +363 -257
- data/test/exclude_threads_test.rb +48 -48
- data/test/fiber_test.rb +195 -195
- data/test/gc_test.rb +104 -102
- data/test/inverse_call_tree_test.rb +174 -174
- data/test/line_number_test.rb +563 -289
- data/test/marshal_test.rb +144 -145
- data/test/measure_allocations.rb +26 -26
- data/test/measure_allocations_test.rb +1511 -1081
- data/test/measure_process_time_test.rb +3286 -2477
- data/test/measure_times.rb +56 -56
- data/test/measure_wall_time_test.rb +773 -568
- data/test/measurement_test.rb +82 -82
- data/test/merge_test.rb +146 -146
- data/test/method_info_test.rb +100 -95
- data/test/multi_printer_test.rb +52 -66
- data/test/no_method_class_test.rb +15 -15
- data/test/pause_resume_test.rb +171 -171
- data/test/prime.rb +54 -54
- data/test/prime_script.rb +5 -5
- data/test/printer_call_stack_test.rb +28 -27
- data/test/printer_call_tree_test.rb +30 -30
- data/test/printer_flame_graph_test.rb +82 -0
- data/test/printer_flat_test.rb +99 -99
- data/test/printer_graph_html_test.rb +62 -59
- data/test/printer_graph_test.rb +42 -40
- data/test/printers_test.rb +162 -135
- data/test/printing_recursive_graph_test.rb +81 -81
- data/test/profile_test.rb +101 -101
- data/test/rack_test.rb +103 -93
- data/test/recursive_test.rb +796 -622
- data/test/scheduler.rb +4 -0
- data/test/singleton_test.rb +39 -38
- data/test/stack_printer_test.rb +61 -61
- data/test/start_stop_test.rb +106 -106
- data/test/test_helper.rb +24 -20
- data/test/thread_test.rb +229 -231
- data/test/unique_call_path_test.rb +123 -136
- data/test/yarv_test.rb +56 -60
- metadata +81 -15
- data/ext/ruby_prof/rp_measure_memory.c +0 -46
- data/lib/ruby-prof/compatibility.rb +0 -113
- data/test/compatibility_test.rb +0 -49
- data/test/crash2.rb +0 -144
- data/test/measure_memory_test.rb +0 -1456
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e224180ee0860da7eab97053ea3b121fee69548319a876ff36281d8adf685ca
|
|
4
|
+
data.tar.gz: 0a31dd2aa2d8606e5f707d1d10c0e0989ecaab0207f941f92d3c3fba0dd6d837
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25a752b1bb9d94fdfcb0c7fc981cebf9427759fb37f585ba103d63b96b6347e884da9a1dff19a56053953cfd95341ff14c52293361a3a4f8ed347381d4a80d31
|
|
7
|
+
data.tar.gz: 9569f365932edcaf06c58b7f7672e75282efa51605b954ff2a3097a2fb48db155a4ffdc6416e47be9193734c679d7d037baa0925f34d61b09979552827b052ae
|
data/{CHANGES → CHANGELOG.md}
RENAMED
|
@@ -1,26 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.0.0 (2026-02-13)
|
|
4
|
+
### Features
|
|
5
|
+
* Ruby 4.0 support.
|
|
6
|
+
* Add flame graph visualizations with icicle mode toggle
|
|
7
|
+
* Lots of documentation updates!
|
|
8
|
+
* Apply consistent styling across all reports
|
|
9
|
+
* Add `Profile#measure_mode_name` method for human-friendly measurement mode names (e.g., "Wall Time" instead of "wall_time")
|
|
10
|
+
* Fix DotPrinter generating self-referencing edges (was using callers instead of callees)
|
|
11
|
+
* Add Graphviz Online viewer link for dot output
|
|
12
|
+
|
|
13
|
+
### Backwards Incompatible Changes
|
|
14
|
+
* Removed `RubyProf::MEMORY` measurement mode (no longer works on Ruby 4.0+)
|
|
15
|
+
* Rremove compatibility API that was scheduled for removal in 2023
|
|
16
|
+
* Printer options now use keyword arguments instead of an options hash. For example:
|
|
17
|
+
```ruby
|
|
18
|
+
# Before:
|
|
19
|
+
printer.print(STDOUT, :min_percent => 2, :sort_method => :self_time)
|
|
20
|
+
# After:
|
|
21
|
+
printer.print(STDOUT, min_percent: 2, sort_method: :self_time)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 1.7.2 (2025-05-21)
|
|
25
|
+
* Fix compiling on Ubuntu and Arch Linux
|
|
26
|
+
* Update tests for Ruby 3.4
|
|
27
|
+
* Remove tests for Ruby 3.1
|
|
28
|
+
* Update MacOS to use clock_gettime (same as Linux) instead of proprietary mach_absolute_time API
|
|
29
|
+
* Add CMake support
|
|
30
|
+
|
|
31
|
+
## 1.7.1 (2024-10-19)
|
|
32
|
+
* Fix crashes when calling merge due to inconsistent method keys (Chris Heald)
|
|
33
|
+
|
|
34
|
+
## 1.7.0 (2024-01-07)
|
|
3
35
|
* Add support for ruby 3.3.* (Charlie Savage)
|
|
4
36
|
* Remove support for ruby 2.7.* (Charlie Savage)
|
|
5
37
|
* Fix crash caused by referencing Profile Ruby objects from Method objects that were being moved
|
|
6
38
|
by GC compaction (Charlie Savage)
|
|
7
39
|
|
|
8
|
-
1.6.3 (2023-04-20)
|
|
9
|
-
=====================
|
|
40
|
+
## 1.6.3 (2023-04-20)
|
|
10
41
|
* Remove debug code unintentionally left in ruby-prof command line program (Charlie Savage)
|
|
11
42
|
|
|
12
|
-
1.6.2 (2023-04-17)
|
|
13
|
-
=====================
|
|
43
|
+
## 1.6.2 (2023-04-17)
|
|
14
44
|
* Fix Profile#merge! implementation (asksurya)
|
|
15
45
|
* Fix ruby-prof command line program (Charlie Savage)
|
|
16
46
|
* Added CMakeLists.txt file (Charlie Savage)
|
|
17
47
|
|
|
18
|
-
1.6.1 (2023-02-21)
|
|
19
|
-
=====================
|
|
48
|
+
## 1.6.1 (2023-02-21)
|
|
20
49
|
* Fix loading C extension for MacOS (Charlie Savage)
|
|
21
50
|
|
|
22
|
-
1.6.0 (2023-02-20)
|
|
23
|
-
=====================
|
|
51
|
+
## 1.6.0 (2023-02-20)
|
|
24
52
|
* Add support for Ruby's compacting garbage collector (Charlie Savage)
|
|
25
53
|
* Add rbs signature files (Charlie Savage)
|
|
26
54
|
* Update rack adapter used for profiling Rails to include latest ruby-prof features (Charlie Savage)
|
|
@@ -28,19 +56,16 @@
|
|
|
28
56
|
* Update tests to not use deprecated methods (Charlie Savage)
|
|
29
57
|
* Improve tests on OSX (Charlie Savage)
|
|
30
58
|
|
|
31
|
-
1.5.0 (2023-02-06)
|
|
32
|
-
=====================
|
|
59
|
+
## 1.5.0 (2023-02-06)
|
|
33
60
|
* Add new Profile#merge! method that merges results for threads/fibers that share the same root method (Charlie Savage)
|
|
34
61
|
* Expand API to allow creation of +Measurement+, +CallTree+, +MethodInfo+ and +Thread+ instances. This
|
|
35
62
|
was done to make is possible to write tests for the new Profile#merge! functionality (Charlie Savage)
|
|
36
63
|
|
|
37
|
-
1.4.5 (2022-12-27)
|
|
38
|
-
=====================
|
|
64
|
+
## 1.4.5 (2022-12-27)
|
|
39
65
|
* Look for ruby_prof extension built on install in the lib directory (Charlie Savage)
|
|
40
66
|
* Added Ruby 3.2.0 build for mingw-urct
|
|
41
67
|
|
|
42
|
-
1.4.4 (2022-12-11)
|
|
43
|
-
=====================
|
|
68
|
+
## 1.4.4 (2022-12-11)
|
|
44
69
|
* Update tests for Ruby 3.1 (Charlie Savage)
|
|
45
70
|
* When tracing allocations always use the RUBY_INTERNAL_EVENT_NEWOBJ trace event. Previously GC stats could also be used, but that includes the creation of internal T_IMEMO objects makes reviewing results confusing (Charlie Savage)
|
|
46
71
|
* Remove :profile option that lets a user set the prefix on callgrind output files since KCacheGrind will not automatically show these files in its open dialog. Fixes #313. (Charlie Savage)
|
|
@@ -54,8 +79,7 @@
|
|
|
54
79
|
* Fix typo. s/perecent/percent/ (Paarth Madan)
|
|
55
80
|
* Remove support for Ruby 2.5 and 2.6 which are now end of life (Charlie Savage)
|
|
56
81
|
|
|
57
|
-
1.4.3 (2021-02-16)
|
|
58
|
-
=====================
|
|
82
|
+
## 1.4.3 (2021-02-16)
|
|
59
83
|
* Remove trailing spaces (sergioro)
|
|
60
84
|
* Load "ruby-prof.so" with require_relative (sergioro)
|
|
61
85
|
* Use same file permissions for all test files (sergioro)
|
|
@@ -68,44 +92,37 @@
|
|
|
68
92
|
* Remove Ruby 2.4 support since it is no longer maintained (Charlie Savage)
|
|
69
93
|
* Replace travis status badge with github status badge (Charlie Savage)
|
|
70
94
|
|
|
71
|
-
1.4.2 (2020-11-3)
|
|
72
|
-
=====================
|
|
95
|
+
## 1.4.2 (2020-11-3)
|
|
73
96
|
* Do NOT use Ruby 2.7.0 and 2.7.1 with ruby-prof. A bug in those versions of ruby causes ruby-prof to
|
|
74
97
|
not work. Version 2.7.2 works correctly.
|
|
75
98
|
* Fix crash caused be reallocating an internal stack that keeps tracks of frames *after* getting a reference to the
|
|
76
99
|
top frame in the stack (Charlie Savage).
|
|
77
100
|
* Fix bug where the flat printer did not correctly report the correct measurement mode.
|
|
78
101
|
|
|
79
|
-
1.4.1 (2020-05-14)
|
|
80
|
-
=====================
|
|
102
|
+
## 1.4.1 (2020-05-14)
|
|
81
103
|
* Fix compiling on older versions of gcc that do not default to c99 (Charlie Savage)
|
|
82
104
|
|
|
83
|
-
1.4.0 (2020-05-12)
|
|
84
|
-
=====================
|
|
105
|
+
## 1.4.0 (2020-05-12)
|
|
85
106
|
* API change - remove merge_fibers support since it resulted in incorrect results or crashes (Charlie Savage)
|
|
86
107
|
* Fix crash when profiling memory usage (Charlie Savage)
|
|
87
108
|
* When tracing execution correctly print out newobj tracepoint events (Charlie Savage)
|
|
88
109
|
* Remove no longer needed code for building extensions (Charlie Savage)
|
|
89
110
|
|
|
90
|
-
1.3.2 (2020-04-19)
|
|
91
|
-
=====================
|
|
111
|
+
## 1.3.2 (2020-04-19)
|
|
92
112
|
* Fix rack profiler so it is thread safe (Charlie Savage)
|
|
93
113
|
* Fix loading of prebuilt binaries on mingw64 to use Ruby's major and minor version (Charlie Savage)
|
|
94
114
|
|
|
95
|
-
1.3.1 (2020-03-11)
|
|
96
|
-
=====================
|
|
115
|
+
## 1.3.1 (2020-03-11)
|
|
97
116
|
* Add max_percent and filter_by options to flat printer (Sean McGivern)
|
|
98
117
|
* Include binary in mingw64 build (Charlie Savage)
|
|
99
118
|
|
|
100
|
-
1.3.0 (2020-02-22)
|
|
101
|
-
=====================
|
|
119
|
+
## 1.3.0 (2020-02-22)
|
|
102
120
|
* Update C code to use newer RTypedData API versus older RData API.
|
|
103
121
|
* Update C code to use rb_cObject versus the older, deprecated, rb_cData.
|
|
104
122
|
* Update memory management - CallInfo's now keep alive their owning Profile instances. Fixes crashes that
|
|
105
123
|
could happen in rare instances.
|
|
106
124
|
|
|
107
|
-
1.2.0 (2020-01-23)
|
|
108
|
-
=====================
|
|
125
|
+
## 1.2.0 (2020-01-23)
|
|
109
126
|
* Fix call stack printer broken in version 1.0.0 (Charlie Savage)
|
|
110
127
|
* Ruby 2.7.0 support (Charlie Savage)
|
|
111
128
|
* Switch to Windows high precision timer for measuring wall time (Charlie Savage)
|
|
@@ -115,15 +132,13 @@ top frame in the stack (Charlie Savage).
|
|
|
115
132
|
* API change - CallInfo has been renamed CallTree
|
|
116
133
|
* Fix crashes on Ruby 2.4.*
|
|
117
134
|
|
|
118
|
-
1.1.0 (2019-12-14)
|
|
119
|
-
=====================
|
|
135
|
+
## 1.1.0 (2019-12-14)
|
|
120
136
|
Changes
|
|
121
137
|
|
|
122
138
|
* Reimplement merge_fibers (Charlie Savage)
|
|
123
139
|
* Fix crash caused by threads being freed when profiles are freed (Charlie Savage)
|
|
124
140
|
|
|
125
|
-
1.0.0 (2019-07-29)
|
|
126
|
-
=====================
|
|
141
|
+
## 1.0.0 (2019-07-29)
|
|
127
142
|
ruby-prof's development stretches all the way back to 2005. Fourteen years later, it seems time for version 1.0!
|
|
128
143
|
Version 1.0 is a significant update that greatly improves the internals of ruby-prof and adds a number of improvements.
|
|
129
144
|
|
|
@@ -147,10 +162,8 @@ At the same time, it was also time to remove old code and deprecated methods. Th
|
|
|
147
162
|
* Removed support for RUBY_PROF_EDITOR_URI environment variable that specified the link scheme. This features was more confusing then helpful.
|
|
148
163
|
|
|
149
164
|
|
|
150
|
-
0.18.0 (2019-05-27)
|
|
151
|
-
|
|
152
|
-
Fixes
|
|
153
|
-
------
|
|
165
|
+
## 0.18.0 (2019-05-27)
|
|
166
|
+
### Fixes
|
|
154
167
|
* Fix grouping by thread/fiber (Charlie Savage)
|
|
155
168
|
* Fix include/exclude thread checking (Charlie Savage)
|
|
156
169
|
* Fix failing tests (Charlie Savage)
|
|
@@ -165,8 +178,7 @@ Fixes
|
|
|
165
178
|
* Travis updates (Niocals Leger and Charlie Savage)
|
|
166
179
|
* Fix NewRelic module detection in exclude_common_methods! (Ben Hughes)
|
|
167
180
|
|
|
168
|
-
0.17.0 (2017-12-17)
|
|
169
|
-
=====================
|
|
181
|
+
## 0.17.0 (2017-12-17)
|
|
170
182
|
* Changed method/class names produced by the callgrind printer to be more kcachegrind
|
|
171
183
|
friendly (thx to Nelson Gauthier and Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/200).
|
|
172
184
|
* Recursive instances of a method call are now dtected during profiling (thx to Nelson Gauthier and
|
|
@@ -180,16 +192,13 @@ Fixes
|
|
|
180
192
|
* Fixed that calling profile.stop would stop profiling all active profiling runs.
|
|
181
193
|
* Fixed that remembering parent call frame pointer before stack reallocation could cause a segfault.
|
|
182
194
|
|
|
183
|
-
0.16.2 (2016-08-25)
|
|
184
|
-
=====================
|
|
195
|
+
## 0.16.2 (2016-08-25)
|
|
185
196
|
* fixed incorrect setting of RUBY_VERSION macro
|
|
186
197
|
|
|
187
|
-
0.16.1 (2016-08-24)
|
|
188
|
-
=====================
|
|
198
|
+
## 0.16.1 (2016-08-24)
|
|
189
199
|
* fixed compile problem with ruby 2.1.10
|
|
190
200
|
|
|
191
|
-
0.16.0 (2016-08-24)
|
|
192
|
-
=====================
|
|
201
|
+
## 0.16.0 (2016-08-24)
|
|
193
202
|
* ruby-prof can now be installed if ruby has been compiled with --disable-gems or
|
|
194
203
|
RUBYOPT includes --disable-gems (thx to Arthur Nogueira Neves)
|
|
195
204
|
* Profile.new now accepts and prefers an options hash:
|
|
@@ -214,78 +223,61 @@ Fixes
|
|
|
214
223
|
* fixed setting threshold bug when displaying stack profiles (thx to Michal Konarski)
|
|
215
224
|
* code related to printing profiles is now autoloaded for efficiency (thx to Dave Gynn)
|
|
216
225
|
|
|
217
|
-
0.15.9 (2015-12-08)
|
|
218
|
-
======================
|
|
226
|
+
## 0.15.9 (2015-12-08)
|
|
219
227
|
* rack profiler now supports lambdas for generating profile paths (thx to Jean Rougé)
|
|
220
228
|
* fixed a bug when printing graph profiles
|
|
221
229
|
|
|
222
|
-
0.15.8 (2015-04-24)
|
|
223
|
-
======================
|
|
230
|
+
## 0.15.8 (2015-04-24)
|
|
224
231
|
* added missing assets to gem build
|
|
225
232
|
* fixed randomly failing test
|
|
226
233
|
|
|
227
|
-
0.15.7 (2015-04-23)
|
|
228
|
-
======================
|
|
234
|
+
## 0.15.7 (2015-04-23)
|
|
229
235
|
* html profiles are now single page (thx to Thomas Leishman)
|
|
230
236
|
|
|
231
|
-
0.15.6 (2015-02-22)
|
|
232
|
-
======================
|
|
237
|
+
## 0.15.6 (2015-02-22)
|
|
233
238
|
* improved upon computing children time in graph printers
|
|
234
239
|
|
|
235
|
-
0.15.5 (2015-02-22)
|
|
236
|
-
======================
|
|
240
|
+
## 0.15.5 (2015-02-22)
|
|
237
241
|
* changed output format of flat_printer_with_line_number
|
|
238
242
|
* support using multi printer from command line (Dov Murik)
|
|
239
243
|
|
|
240
|
-
0.15.4 (2015-02-14)
|
|
241
|
-
======================
|
|
244
|
+
## 0.15.4 (2015-02-14)
|
|
242
245
|
* using env variable to specify mesaurement mode work again
|
|
243
246
|
* measuring memory/object allocations works for 2.1 adn 2.2 again
|
|
244
247
|
|
|
245
|
-
0.15.3 (2015-01-16)
|
|
246
|
-
======================
|
|
248
|
+
## 0.15.3 (2015-01-16)
|
|
247
249
|
* support ruby 2.2.0
|
|
248
250
|
|
|
249
|
-
0.15.2 (2014-05-20)
|
|
250
|
-
======================
|
|
251
|
+
## 0.15.2 (2014-05-20)
|
|
251
252
|
* rack middleware creates print dir for profile result (Neng)
|
|
252
253
|
|
|
253
|
-
0.15.1 (2014-05-20)
|
|
254
|
-
======================
|
|
254
|
+
## 0.15.1 (2014-05-20)
|
|
255
255
|
* added license to gemspec
|
|
256
256
|
|
|
257
|
-
0.15.0 (2014-05-02)
|
|
258
|
-
======================
|
|
257
|
+
## 0.15.0 (2014-05-02)
|
|
259
258
|
* improved cpu time measurement (Charlie Somerville)
|
|
260
259
|
|
|
261
|
-
0.14.2 (2014-01-05)
|
|
262
|
-
======================
|
|
260
|
+
## 0.14.2 (2014-01-05)
|
|
263
261
|
* hopefully fixed compile problem under Windows
|
|
264
262
|
|
|
265
|
-
0.14.0 (2014-01-02)
|
|
266
|
-
======================
|
|
263
|
+
## 0.14.0 (2014-01-02)
|
|
267
264
|
* support ruby 2.1.0
|
|
268
265
|
* dropped support for 1.8.x, 1.9.1 and 1.9.2
|
|
269
266
|
|
|
270
|
-
0.13.1 (2013-12-14)
|
|
271
|
-
======================
|
|
267
|
+
## 0.13.1 (2013-12-14)
|
|
272
268
|
* speed up for displaying large call stacks (Benjamin Quoming)
|
|
273
269
|
|
|
274
|
-
0.13 (2013-03-10)
|
|
275
|
-
======================
|
|
270
|
+
## 0.13 (2013-03-10)
|
|
276
271
|
* support fibers on 1.9.x+
|
|
277
272
|
* improved display for very wide call stacks (Sammy Larbi)
|
|
278
273
|
|
|
279
|
-
0.12.2 (2013-02-13)
|
|
280
|
-
======================
|
|
274
|
+
## 0.12.2 (2013-02-13)
|
|
281
275
|
* Fixed segfault when using falcon or railsexpress patches for 1.9.3
|
|
282
276
|
|
|
283
|
-
0.12.1 (2013-01-07)
|
|
284
|
-
======================
|
|
277
|
+
## 0.12.1 (2013-01-07)
|
|
285
278
|
* Add back in pause/resume support since Rails uses it
|
|
286
279
|
|
|
287
|
-
0.12.0 (2013-01-06)
|
|
288
|
-
======================
|
|
280
|
+
## 0.12.0 (2013-01-06)
|
|
289
281
|
* Ruby 2.0.0 support (Charlie Savage)
|
|
290
282
|
* Fix issue where profiling results could exceed 100% if profile code had multiple top level methods (Charlie Savage)
|
|
291
283
|
* Replaced RubyProf::Thread#top_method with RubyProf::Thread#top_methods (Charlie Savage)
|
|
@@ -296,8 +288,7 @@ Fixes
|
|
|
296
288
|
* Fix list formatting in readme (Thilo Rusche)
|
|
297
289
|
* Remove pause/resume support since its buggy and complicates the code
|
|
298
290
|
|
|
299
|
-
0.11.3 (2012-12-27)
|
|
300
|
-
======================
|
|
291
|
+
## 0.11.3 (2012-12-27)
|
|
301
292
|
* Prefix c functions with prof_ to avoid name conflicts (Kenta Murata)
|
|
302
293
|
* Update ruby-prof script to avoid seg faults (Gary Weaver)
|
|
303
294
|
* Rakefile updates (Roger Pack)
|
|
@@ -307,20 +298,17 @@ Fixes
|
|
|
307
298
|
* Remove duplicate code (Chas Lemley)
|
|
308
299
|
|
|
309
300
|
|
|
310
|
-
0.11.2 (2012-05-06)
|
|
311
|
-
======================
|
|
301
|
+
## 0.11.2 (2012-05-06)
|
|
312
302
|
* Fix compile issue with BOOL. Should be _Bool for C99.
|
|
313
303
|
|
|
314
304
|
|
|
315
|
-
0.11.1 (2012-05-06)
|
|
316
|
-
======================
|
|
305
|
+
## 0.11.1 (2012-05-06)
|
|
317
306
|
* Added option --exclude-common-callbacks, plus exclude #map and #inject in common cycles (Vasily Fedoseyev)
|
|
318
307
|
* Add option --exclude-common-cycles to exclude common iterators (Vasily Fedoseyev)
|
|
319
308
|
* Allow method elimination from command line via '-x' and '-X' keys (Vasily Fedoseyev)
|
|
320
309
|
|
|
321
310
|
|
|
322
|
-
0.11.0 (2012-05-05)
|
|
323
|
-
======================
|
|
311
|
+
## 0.11.0 (2012-05-05)
|
|
324
312
|
* Fix pause/resume so it actually works and add tests (David Barri)
|
|
325
313
|
* Resume now returns the result of the block when given (David Barri)
|
|
326
314
|
* Make recursive method explanation more clear (Charlie Savage)
|
|
@@ -330,13 +318,11 @@ Fixes
|
|
|
330
318
|
* Fix tests on 1.8.7 (rogerdpack)
|
|
331
319
|
|
|
332
320
|
|
|
333
|
-
0.11.0.rc3 (2012-03-26)
|
|
334
|
-
======================
|
|
321
|
+
## 0.11.0.rc3 (2012-03-26)
|
|
335
322
|
* Include missing files in gemspec (Charlie Savage).
|
|
336
323
|
|
|
337
324
|
|
|
338
|
-
0.11.0.rc2 (2012-03-25)
|
|
339
|
-
======================
|
|
325
|
+
## 0.11.0.rc2 (2012-03-25)
|
|
340
326
|
* Lots of improvements to Rack handler - this can be used to profile requests
|
|
341
327
|
in Rails and other rack-based ruby web frameworks (Charlie Savage).
|
|
342
328
|
* Reimplemented handling of recursive calls using CallInfoVisitor (Charlie Savage).
|
|
@@ -350,8 +336,7 @@ Fixes
|
|
|
350
336
|
* Significant updates to documentation (Charlie Savage).
|
|
351
337
|
* More c code cleanup (Charlie Savage).
|
|
352
338
|
|
|
353
|
-
0.11.0.rc1 (2012-03-24)
|
|
354
|
-
======================
|
|
339
|
+
## 0.11.0.rc1 (2012-03-24)
|
|
355
340
|
* Big internal refactoring of C code to make RubyProf easier to understand and extend (Charlie Savage).
|
|
356
341
|
* Profile results are now returned as instances of a new class RubyProf::Profile. The old api
|
|
357
342
|
is supported via a compatability layer that at some point will be deprecated. (Charlie Savage).
|
|
@@ -370,54 +355,42 @@ Fixes
|
|
|
370
355
|
* Remove custom mingw build scripts, use rake compiler instead (Charlie Savage).
|
|
371
356
|
* Fixes for compiling with VC 2010 (Charlie Savage).
|
|
372
357
|
|
|
373
|
-
0.10.8 (2011-07-06)
|
|
374
|
-
======================
|
|
358
|
+
## 0.10.8 (2011-07-06)
|
|
375
359
|
* 1.9.3 super class (Roger Pack)
|
|
376
360
|
|
|
377
|
-
0.10.7 (2011-05-09)
|
|
378
|
-
======================
|
|
361
|
+
## 0.10.7 (2011-05-09)
|
|
379
362
|
* Fix a bug with REE's GC stats. Issue #53 [thanks graaff]
|
|
380
363
|
|
|
381
|
-
0.10.6 (2011-04-29)
|
|
382
|
-
======================
|
|
364
|
+
## 0.10.6 (2011-04-29)
|
|
383
365
|
* Slightly more normalized url for linux/windows links to files.
|
|
384
366
|
|
|
385
|
-
0.10.5 (2011-04-20)
|
|
386
|
-
=======================
|
|
367
|
+
## 0.10.5 (2011-04-20)
|
|
387
368
|
* 1.8.6 compat for -v command (bug fix)
|
|
388
369
|
|
|
389
|
-
0.10.4 (2011-04-20)
|
|
390
|
-
=======================
|
|
370
|
+
## 0.10.4 (2011-04-20)
|
|
391
371
|
* Faster load time for ruby-prof itself.
|
|
392
372
|
|
|
393
|
-
0.10.3
|
|
394
|
-
=======================
|
|
373
|
+
## 0.10.3
|
|
395
374
|
* Can cleanly load before rubygems now.
|
|
396
375
|
|
|
397
|
-
0.10.2
|
|
398
|
-
=======================
|
|
376
|
+
## 0.10.2
|
|
399
377
|
* Fix for 1.9.2, os x for latest commits (thanks skaes!)
|
|
400
378
|
|
|
401
|
-
0.10.1
|
|
402
|
-
=======================
|
|
379
|
+
## 0.10.1
|
|
403
380
|
* Fix bug in linux wall time, also load with only relative paths so that you can use it to benchmark rubygems startup overhead,
|
|
404
381
|
itself.
|
|
405
382
|
|
|
406
|
-
0.10.0
|
|
407
|
-
=======================
|
|
383
|
+
## 0.10.0
|
|
408
384
|
* Some rdoc changes, for linux wall time attempt to use higher granularity (thanks to all the contributors for this round!)
|
|
409
385
|
|
|
410
|
-
0.9.2
|
|
411
|
-
=======================
|
|
386
|
+
## 0.9.2
|
|
412
387
|
* Make graphviz work on 1.8.6
|
|
413
388
|
* Roll back some 1.9.2 optimizations until I can figure out what caused them.
|
|
414
389
|
|
|
415
|
-
0.9.1
|
|
416
|
-
=======================
|
|
390
|
+
## 0.9.1
|
|
417
391
|
* Add a graphviz output
|
|
418
392
|
|
|
419
|
-
0.9.0
|
|
420
|
-
=======================
|
|
393
|
+
## 0.9.0
|
|
421
394
|
* measurements for recursive methods are now correct
|
|
422
395
|
* gave up on splitting up recursive methods according to call depth
|
|
423
396
|
* made it possible to eliminate methods from profiling results
|
|
@@ -426,39 +399,32 @@ Fixes
|
|
|
426
399
|
* HTML profiles contain Textmate links so you can jump to the source code easily
|
|
427
400
|
* producing an event log is now a runtime option
|
|
428
401
|
|
|
429
|
-
0.7.10 (2009-01-22)
|
|
430
|
-
=======================
|
|
402
|
+
## 0.7.10 (2009-01-22)
|
|
431
403
|
* fix SEGFAULT in 1.9
|
|
432
404
|
* add new printer flat_printer_with_line_numbers
|
|
433
405
|
|
|
434
|
-
0.7.7 (2009-01-13)
|
|
435
|
-
======================
|
|
406
|
+
## 0.7.7 (2009-01-13)
|
|
436
407
|
* "fix" multi threading support for 1.9 http://redmine.ruby-lang.org/issues/show/2012
|
|
437
408
|
* speedups
|
|
438
409
|
|
|
439
|
-
0.7.6 (2009-12-31)
|
|
440
|
-
======================
|
|
410
|
+
## 0.7.6 (2009-12-31)
|
|
441
411
|
* fix some tests for 1.9 (no real code changes)
|
|
442
412
|
|
|
443
|
-
0.7.5 (2009-12)
|
|
444
|
-
========================
|
|
413
|
+
## 0.7.5 (2009-12)
|
|
445
414
|
* fix a GC collection bug (nobu's patch).
|
|
446
415
|
* correctly report recursive call depths (Kevin Scaldeferri).
|
|
447
416
|
* sort methods on output (Kevin Scaldeferri).
|
|
448
417
|
|
|
449
|
-
0.7.3 (2008-12-09)
|
|
450
|
-
========================
|
|
418
|
+
## 0.7.3 (2008-12-09)
|
|
451
419
|
* Fixed compile error with new x86_64 code using GCC.
|
|
452
420
|
|
|
453
|
-
0.7.2 (2008-12-08)
|
|
454
|
-
========================
|
|
421
|
+
## 0.7.2 (2008-12-08)
|
|
455
422
|
* Fixed major bug in printing child methods in graph reports.
|
|
456
423
|
|
|
457
424
|
* Fixes for supporting x86_64 machines (Diego Pettenò)
|
|
458
425
|
|
|
459
426
|
|
|
460
|
-
0.7.1 (2008-11-28)
|
|
461
|
-
========================
|
|
427
|
+
## 0.7.1 (2008-11-28)
|
|
462
428
|
* Added new AggregateCallTree class for printers to
|
|
463
429
|
make results easier to read. Take this call sequence
|
|
464
430
|
for example:
|
|
@@ -478,11 +444,9 @@ Fixes
|
|
|
478
444
|
* Fixes for supporting x86_64 machines (Matt Sanford)
|
|
479
445
|
|
|
480
446
|
|
|
481
|
-
0.7.0 (2008-11-04)
|
|
482
|
-
========================
|
|
447
|
+
## 0.7.0 (2008-11-04)
|
|
483
448
|
|
|
484
|
-
Features
|
|
485
|
-
--------
|
|
449
|
+
### Features
|
|
486
450
|
* Added two new methods - RubyProf.resume and RubyProf.pause.
|
|
487
451
|
RubyProf.resume takes an optional block, which ensures that
|
|
488
452
|
RubyProf.pause is called. For example:
|
|
@@ -523,29 +487,25 @@ Features
|
|
|
523
487
|
See http://lloydforge.org/projects/ruby. (Jeremy Kemper).
|
|
524
488
|
|
|
525
489
|
|
|
526
|
-
Fixes
|
|
527
|
-
-------
|
|
490
|
+
### Fixes
|
|
528
491
|
* RubyProf.profile no longer crashes if an exception is
|
|
529
492
|
thrown during a profiling run.
|
|
530
493
|
|
|
531
494
|
* Measure memory in fractional kilobytes rather than rounding down (Jeremy Kemper)
|
|
532
495
|
|
|
533
496
|
|
|
534
|
-
0.6.0 (2008-02-03)
|
|
535
|
-
========================
|
|
497
|
+
## 0.6.0 (2008-02-03)
|
|
536
498
|
|
|
537
499
|
ruby-prof 0.6.0 adds support for Ruby 1.9 and memory profiling.
|
|
538
500
|
|
|
539
|
-
Features
|
|
540
|
-
--------
|
|
501
|
+
### Features
|
|
541
502
|
* Added support for ruby 1.9 (Shugo Maeda)
|
|
542
503
|
* Added support for outputting printer results to a String, Array or IO
|
|
543
504
|
object (Michael Granger)
|
|
544
505
|
* Add new memory profiling mode. Note this mode depends on a
|
|
545
506
|
patched Ruby interpreter (Alexander Dymo)
|
|
546
507
|
|
|
547
|
-
Fixes
|
|
548
|
-
-------
|
|
508
|
+
### Fixes
|
|
549
509
|
* Improvements to GraphHtmlPrinter including updated documentation,
|
|
550
510
|
fixes for min_time support, ability to specify templates using
|
|
551
511
|
strings or filenames, and table layout fixes (Makoto Kuwata)
|
|
@@ -562,28 +522,23 @@ Fixes
|
|
|
562
522
|
set their values to nil if the functionality is not available.
|
|
563
523
|
|
|
564
524
|
|
|
565
|
-
0.5.2 (2007-07-19)
|
|
566
|
-
========================
|
|
525
|
+
## 0.5.2 (2007-07-19)
|
|
567
526
|
|
|
568
527
|
ruby-prof 0.5.2 is a bug fix release.
|
|
569
528
|
|
|
570
|
-
Fixes
|
|
571
|
-
-------
|
|
529
|
+
### Fixes
|
|
572
530
|
* Include missing rails plugin
|
|
573
531
|
|
|
574
532
|
|
|
575
|
-
0.5.1 (2007-07-18)
|
|
576
|
-
========================
|
|
533
|
+
## 0.5.1 (2007-07-18)
|
|
577
534
|
|
|
578
535
|
ruby-prof 0.5.1 is a bug fix and performance release.
|
|
579
536
|
|
|
580
|
-
Performance
|
|
581
|
-
--------
|
|
537
|
+
### Performance
|
|
582
538
|
* Significantly reduced the number of thread lookups by
|
|
583
539
|
caching the last executed thread.
|
|
584
540
|
|
|
585
|
-
Fixes
|
|
586
|
-
-------
|
|
541
|
+
### Fixes
|
|
587
542
|
* Properly escape method names in HTML reports
|
|
588
543
|
* Fix use of -m and --min-percent command line switches
|
|
589
544
|
* Default source file information to ruby_runtime#0 for c calls
|
|
@@ -593,11 +548,9 @@ Fixes
|
|
|
593
548
|
* Added additional tests
|
|
594
549
|
|
|
595
550
|
|
|
596
|
-
0.5.0 (2007-07-09)
|
|
597
|
-
========================
|
|
551
|
+
## 0.5.0 (2007-07-09)
|
|
598
552
|
|
|
599
|
-
Features
|
|
600
|
-
--------
|
|
553
|
+
### Features
|
|
601
554
|
* Added support for timing multi-threaded applications
|
|
602
555
|
* Added support for 64 bit systems (patch from Diego 'Flameeyes' Petten)
|
|
603
556
|
* Added suport for outputting data in the format used by
|
|
@@ -608,8 +561,7 @@ Features
|
|
|
608
561
|
* Added better support for recursive methods
|
|
609
562
|
* Added better support for profiling Rails applications
|
|
610
563
|
|
|
611
|
-
Fixes
|
|
612
|
-
-------
|
|
564
|
+
### Fixes
|
|
613
565
|
* Fixes bug when the type of an attached object (singleton) is inherited
|
|
614
566
|
from T_OBJECT as opposed to being a T_OBJECT (identified by Francis Cianfrocca)
|
|
615
567
|
* ruby-prof now works in IRB.
|
|
@@ -617,24 +569,19 @@ Fixes
|
|
|
617
569
|
* Fixed rdoc compile error.
|
|
618
570
|
* Fix tabs in erb template for graph html report on windows.
|
|
619
571
|
|
|
620
|
-
0.4.1 (2006-06-26)
|
|
621
|
-
========================
|
|
572
|
+
## 0.4.1 (2006-06-26)
|
|
622
573
|
|
|
623
|
-
Features
|
|
624
|
-
--------
|
|
574
|
+
### Features
|
|
625
575
|
* Added a RubyProf.running? method to indicate whether a profile is in progress.
|
|
626
576
|
* Added tgz and zip archives to release
|
|
627
577
|
|
|
628
|
-
Fixes
|
|
629
|
-
-------
|
|
578
|
+
### Fixes
|
|
630
579
|
* Duplicate method names are now allowed
|
|
631
580
|
* The documentation has been updated to show the correct API usage is RubyProf.stop not RubyProf.end
|
|
632
581
|
|
|
633
582
|
|
|
634
|
-
0.4.0 (2006-06-16)
|
|
635
|
-
|
|
636
|
-
Features
|
|
637
|
-
--------
|
|
583
|
+
## 0.4.0 (2006-06-16)
|
|
584
|
+
### Features
|
|
638
585
|
* added support for call graphs
|
|
639
586
|
* added support for printers. Currently there is a FlatPrinter,
|
|
640
587
|
GraphPrinter and GraphHtmlPrinter.
|
|
@@ -642,8 +589,7 @@ Features
|
|
|
642
589
|
* added Windows support
|
|
643
590
|
* now packaged as a RubyGem
|
|
644
591
|
|
|
645
|
-
Fixes
|
|
646
|
-
-------
|
|
592
|
+
### Fixes
|
|
647
593
|
* Fixes bug where RubyProf would crash depending on the
|
|
648
594
|
way it was invoked - for example, it did not run when
|
|
649
595
|
used with Arachno Ruby's customized version of Ruby.
|
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# ruby-prof
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
For an overview of ruby-prof please see https://ruby-prof.github.io
|
|
1
|
+
# ruby-prof
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
For an overview of ruby-prof please see https://ruby-prof.github.io
|
data/bin/ruby-prof
CHANGED
|
@@ -165,8 +165,7 @@ module RubyProf
|
|
|
165
165
|
'Select what ruby-prof should measure:',
|
|
166
166
|
' wall - Wall time (default).',
|
|
167
167
|
' process - Process time.',
|
|
168
|
-
' allocations - Object allocations (requires patched Ruby interpreter).'
|
|
169
|
-
' memory - Allocated memory in KB (requires patched Ruby interpreter).') do |measure_mode|
|
|
168
|
+
' allocations - Object allocations (requires patched Ruby interpreter).') do |measure_mode|
|
|
170
169
|
|
|
171
170
|
case measure_mode
|
|
172
171
|
when :wall
|
|
@@ -175,8 +174,6 @@ module RubyProf
|
|
|
175
174
|
options.measure_mode = RubyProf::PROCESS_TIME
|
|
176
175
|
when :allocations
|
|
177
176
|
options.measure_mode = RubyProf::ALLOCATIONS
|
|
178
|
-
when :memory
|
|
179
|
-
options.measure_mode = RubyProf::MEMORY
|
|
180
177
|
end
|
|
181
178
|
end
|
|
182
179
|
|