ruby-prof 1.7.2 → 2.0.1

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