ruby-prof 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES +523 -0
  3. data/LICENSE +25 -0
  4. data/README.rdoc +5 -0
  5. data/Rakefile +110 -0
  6. data/bin/ruby-prof +380 -0
  7. data/bin/ruby-prof-check-trace +45 -0
  8. data/ext/ruby_prof/extconf.rb +36 -0
  9. data/ext/ruby_prof/rp_allocation.c +292 -0
  10. data/ext/ruby_prof/rp_allocation.h +31 -0
  11. data/ext/ruby_prof/rp_call_info.c +283 -0
  12. data/ext/ruby_prof/rp_call_info.h +35 -0
  13. data/ext/ruby_prof/rp_measure_allocations.c +52 -0
  14. data/ext/ruby_prof/rp_measure_memory.c +42 -0
  15. data/ext/ruby_prof/rp_measure_process_time.c +63 -0
  16. data/ext/ruby_prof/rp_measure_wall_time.c +62 -0
  17. data/ext/ruby_prof/rp_measurement.c +236 -0
  18. data/ext/ruby_prof/rp_measurement.h +49 -0
  19. data/ext/ruby_prof/rp_method.c +642 -0
  20. data/ext/ruby_prof/rp_method.h +70 -0
  21. data/ext/ruby_prof/rp_profile.c +881 -0
  22. data/ext/ruby_prof/rp_profile.h +36 -0
  23. data/ext/ruby_prof/rp_stack.c +196 -0
  24. data/ext/ruby_prof/rp_stack.h +56 -0
  25. data/ext/ruby_prof/rp_thread.c +338 -0
  26. data/ext/ruby_prof/rp_thread.h +36 -0
  27. data/ext/ruby_prof/ruby_prof.c +48 -0
  28. data/ext/ruby_prof/ruby_prof.h +17 -0
  29. data/ext/ruby_prof/vc/ruby_prof.sln +31 -0
  30. data/ext/ruby_prof/vc/ruby_prof.vcxproj +143 -0
  31. data/lib/ruby-prof.rb +53 -0
  32. data/lib/ruby-prof/assets/call_stack_printer.css.html +117 -0
  33. data/lib/ruby-prof/assets/call_stack_printer.js.html +385 -0
  34. data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
  35. data/lib/ruby-prof/assets/graph_printer.html.erb +356 -0
  36. data/lib/ruby-prof/call_info.rb +57 -0
  37. data/lib/ruby-prof/call_info_visitor.rb +38 -0
  38. data/lib/ruby-prof/compatibility.rb +109 -0
  39. data/lib/ruby-prof/exclude_common_methods.rb +198 -0
  40. data/lib/ruby-prof/measurement.rb +14 -0
  41. data/lib/ruby-prof/method_info.rb +90 -0
  42. data/lib/ruby-prof/printers/abstract_printer.rb +118 -0
  43. data/lib/ruby-prof/printers/call_info_printer.rb +51 -0
  44. data/lib/ruby-prof/printers/call_stack_printer.rb +269 -0
  45. data/lib/ruby-prof/printers/call_tree_printer.rb +151 -0
  46. data/lib/ruby-prof/printers/dot_printer.rb +132 -0
  47. data/lib/ruby-prof/printers/flat_printer.rb +52 -0
  48. data/lib/ruby-prof/printers/graph_html_printer.rb +64 -0
  49. data/lib/ruby-prof/printers/graph_printer.rb +114 -0
  50. data/lib/ruby-prof/printers/multi_printer.rb +127 -0
  51. data/lib/ruby-prof/profile.rb +33 -0
  52. data/lib/ruby-prof/rack.rb +171 -0
  53. data/lib/ruby-prof/task.rb +147 -0
  54. data/lib/ruby-prof/thread.rb +35 -0
  55. data/lib/ruby-prof/version.rb +3 -0
  56. data/lib/unprof.rb +10 -0
  57. data/ruby-prof.gemspec +58 -0
  58. data/test/abstract_printer_test.rb +26 -0
  59. data/test/alias_test.rb +129 -0
  60. data/test/basic_test.rb +129 -0
  61. data/test/call_info_visitor_test.rb +31 -0
  62. data/test/duplicate_names_test.rb +32 -0
  63. data/test/dynamic_method_test.rb +53 -0
  64. data/test/enumerable_test.rb +21 -0
  65. data/test/exceptions_test.rb +24 -0
  66. data/test/exclude_methods_test.rb +146 -0
  67. data/test/exclude_threads_test.rb +53 -0
  68. data/test/line_number_test.rb +161 -0
  69. data/test/marshal_test.rb +119 -0
  70. data/test/measure_allocations.rb +30 -0
  71. data/test/measure_allocations_test.rb +385 -0
  72. data/test/measure_allocations_trace_test.rb +385 -0
  73. data/test/measure_memory_trace_test.rb +756 -0
  74. data/test/measure_process_time_test.rb +849 -0
  75. data/test/measure_times.rb +54 -0
  76. data/test/measure_wall_time_test.rb +459 -0
  77. data/test/multi_printer_test.rb +71 -0
  78. data/test/no_method_class_test.rb +15 -0
  79. data/test/parser_timings.rb +24 -0
  80. data/test/pause_resume_test.rb +166 -0
  81. data/test/prime.rb +56 -0
  82. data/test/printer_call_tree_test.rb +31 -0
  83. data/test/printer_flat_test.rb +68 -0
  84. data/test/printer_graph_html_test.rb +60 -0
  85. data/test/printer_graph_test.rb +41 -0
  86. data/test/printers_test.rb +141 -0
  87. data/test/printing_recursive_graph_test.rb +81 -0
  88. data/test/rack_test.rb +157 -0
  89. data/test/recursive_test.rb +210 -0
  90. data/test/singleton_test.rb +38 -0
  91. data/test/stack_printer_test.rb +64 -0
  92. data/test/start_stop_test.rb +109 -0
  93. data/test/test_helper.rb +24 -0
  94. data/test/thread_test.rb +144 -0
  95. data/test/unique_call_path_test.rb +190 -0
  96. data/test/yarv_test.rb +56 -0
  97. metadata +189 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2baeb563dfcb30c82aa1235965228b951b096e333c2367274412ace61ec5fbc6
4
+ data.tar.gz: 23840f6343ea4361776e1a01925b829da43e3e45c18717e14dde26eeef8b5858
5
+ SHA512:
6
+ metadata.gz: 26a1d898c0679b366e57451993117146ea160eb9c8bbcde626306f7deac9ce8760ac1633cccb6058574e352fafd32f4e9abb1b3325c6ac6cf13e2fec11794f82
7
+ data.tar.gz: 226493ef8ed88ea3d43ca54925ea43e53558c3a0771bb346992d266de89c2fd4d1b69f8ab1cf2a37e7102eccfbf94340a361f39862171ef90afba58311c488c2
data/CHANGES ADDED
@@ -0,0 +1,523 @@
1
+ 1.0.0 (2019-07-29)
2
+ =====================
3
+ ruby-prof's development stretches all the way back to 2005. Fourteen years later, it seems time for version 1.0!
4
+ Version 1.0 is a significant update that greatly improves the internals of ruby-prof and adds a number of improvements.
5
+
6
+ Changes (Charlie Savage):
7
+
8
+ * Profiling is significantly faster - 5x in some cases
9
+ * Recursive profiles are finally handled correctly. Yeah!!!
10
+ * The ability to measure allocations and memory usage using a standard (unpatched) version of ruby
11
+ * The ability to save and reload profiling results for later analysis
12
+ * The ability track object allocations
13
+
14
+ At the same time, it was also time to remove old code and deprecated methods. These changes include (Charlie Savage):
15
+
16
+ * Drop support for old versions of ruby. Currently 2.4 and up are required.
17
+ * Remove support for method elimination (instead use method exclusion).
18
+ * Remove the CPU_TIME measurement mode since it duplicates the PROCESS_TIME mode and required inline assembly code
19
+ * Remove the GC_TIME and GC_RUNS measurement modes since they required patched ruby versions. In modern ruby it is possible to reimplement this functionality, but it does not seem of that much value (shout out if you want it back).
20
+ * Merge the RubyProf::FlatPrinterWithLineNumbers printer into RubyProf::FlatPrinter.
21
+ * Removed support for RUBY_PROF_EDITOR_URI environment variable that specified the link scheme. This features was more confusing then helpful.
22
+
23
+
24
+ 0.18.0 (2019-05-27)
25
+ =====================
26
+ Fixes
27
+ ------
28
+ * Fix grouping by thread/fiber (Charlie Savage)
29
+ * Fix include/exclude thread checking (Charlie Savage)
30
+ * Fix failing tests (Charlie Savage)
31
+ * Fix grouping by thread_id and fiber_id (Charlie Savage)
32
+ * Update Visual Studio solution to 2019 (Charlie Savage)
33
+ * Adjust AbstractPrinter#editor_uri so it's possible to disable uri (Maciek Dubiński)-
34
+ * Fix -X/--exclude-file option not working (John Lindgren)
35
+ * Different directory for middleware output in readme (Aldric Giacomoni)
36
+ * Fixing spelling mistakes and typos (David Kennedy and Roger Pack)
37
+ * Add "allow_exceptions" option to Profile (Ryan Duryea)
38
+ * Update readme (Jan Piotrowski, Nathan Seither, victor-am)
39
+ * Travis updates (Niocals Leger and Charlie Savage)
40
+ * Fix NewRelic module detection in exclude_common_methods! (Ben Hughes)
41
+
42
+ 0.17.0 (2017-12-17)
43
+ =====================
44
+ * Changed method/class names produced by the callgrind printer to be more kcachegrind
45
+ friendly (thx to Nelson Gauthier and Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/200).
46
+ * Recursive instances of a method call are now dtected during profiling (thx to Nelson Gauthier and
47
+ Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/201).
48
+ * Methods can now be ignored during a profiling run instead of eliminating them
49
+ after a profile run, which has been deprecated (thx to Nelson Gauthier and Ben Hughes,
50
+ see https://github.com/ruby-prof/ruby-prof/pull/202).
51
+ * Use RUBY_PROF_EDITOR_URI=emacs to open source code links in the one true editor.
52
+ (thx Alexander Egorov, see https://github.com/ruby-prof/ruby-prof/pull/183 and
53
+ https://github.com/typester/emacs-handler).
54
+ * Fixed that calling profile.stop would stop profiling all active profiling runs.
55
+ * Fixed that remembering parent call frame pointer before stack reallocation could cause a segfault.
56
+
57
+ 0.16.2 (2016-08-25)
58
+ =====================
59
+ * fixed incorrect setting of RUBY_VERSION macro
60
+
61
+ 0.16.1 (2016-08-24)
62
+ =====================
63
+ * fixed compile problem with ruby 2.1.10
64
+
65
+ 0.16.0 (2016-08-24)
66
+ =====================
67
+ * ruby-prof can now be installed if ruby has been compiled with --disable-gems or
68
+ RUBYOPT includes --disable-gems (thx to Arthur Nogueira Neves)
69
+ * Profile.new now accepts and prefers an options hash:
70
+ - measure_mode: one of the RubyProf measure mode constants
71
+ - exclude_threads: an array of threads to ignore when collecting profile data
72
+ - include_threads: an array of threads to include when collecting profile data
73
+ - merge_fibers: whether or not to merge the profile data for all fibers under their creating thread
74
+ * overhauled printer for cachegrind profiles:
75
+ - profile data for each thread dumped to a separate file, as kcachegrind does not
76
+ fully implement the cachegrind specification
77
+ - this required a change in interface: it's now necessary to specify a directory
78
+ where to dump the cachegrind files
79
+ - naming convention for cachegrind files changed so that kcachegrind shows them
80
+ all in the open dialog
81
+ * improved Rack middleware:
82
+ - it's now possible to use the MultiPrinter
83
+ - new option ignore_existing_threads: will ignore all prexisiting threads
84
+ when profiling a request, except the thread perfoming the request.
85
+ - new option request_thread_only: will ignore all preexisting threads, but also
86
+ all threads spwaned during the execution of the rack request.
87
+ - new option merge_fibers: whether or not to merge the profile data for all fibers under their creating thread
88
+ * fixed setting threshold bug when displaying stack profiles (thx to Michal Konarski)
89
+ * code related to printing profiles is now autoloaded for efficiency (thx to Dave Gynn)
90
+
91
+ 0.15.9 (2015-12-08)
92
+ ======================
93
+ * rack profiler now supports lambdas for generating profile paths (thx to Jean Rougé)
94
+ * fixed a bug when printing graph profiles
95
+
96
+ 0.15.8 (2015-04-24)
97
+ ======================
98
+ * added missing assets to gem build
99
+ * fixed randomly failing test
100
+
101
+ 0.15.7 (2015-04-23)
102
+ ======================
103
+ * html profiles are now single page (thx to Thomas Leishman)
104
+
105
+ 0.15.6 (2015-02-22)
106
+ ======================
107
+ * improved upon computing children time in graph printers
108
+
109
+ 0.15.5 (2015-02-22)
110
+ ======================
111
+ * changed output format of flat_printer_with_line_number
112
+ * support using multi printer from command line (Dov Murik)
113
+
114
+ 0.15.4 (2015-02-14)
115
+ ======================
116
+ * using env variable to specify mesaurement mode work again
117
+ * measuring memory/object allocations works for 2.1 adn 2.2 again
118
+
119
+ 0.15.3 (2015-01-16)
120
+ ======================
121
+ * support ruby 2.2.0
122
+
123
+ 0.15.2 (2014-05-20)
124
+ ======================
125
+ * rack middleware creates print dir for profile result (Neng)
126
+
127
+ 0.15.1 (2014-05-20)
128
+ ======================
129
+ * added license to gemspec
130
+
131
+ 0.15.0 (2014-05-02)
132
+ ======================
133
+ * improved cpu time measurement (Charlie Somerville)
134
+
135
+ 0.14.2 (2014-01-05)
136
+ ======================
137
+ * hopefully fixed compile problem under Windows
138
+
139
+ 0.14.0 (2014-01-02)
140
+ ======================
141
+ * support ruby 2.1.0
142
+ * dropped support for 1.8.x, 1.9.1 and 1.9.2
143
+
144
+ 0.13.1 (2013-12-14)
145
+ ======================
146
+ * speed up for displaying large call stacks (Benjamin Quoming)
147
+
148
+ 0.13 (2013-03-10)
149
+ ======================
150
+ * support fibers on 1.9.x+
151
+ * improved display for very wide call stacks (Sammy Larbi)
152
+
153
+ 0.12.2 (2013-02-13)
154
+ ======================
155
+ * Fixed segfault when using falcon or railsexpress patches for 1.9.3
156
+
157
+ 0.12.1 (2013-01-07)
158
+ ======================
159
+ * Add back in pause/resume support since Rails uses it
160
+
161
+ 0.12.0 (2013-01-06)
162
+ ======================
163
+ * Ruby 2.0.0 support (Charlie Savage)
164
+ * Fix issue where profiling results could exceed 100% if profile code had multiple top level methods (Charlie Savage)
165
+ * Replaced RubyProf::Thread#top_method with RubyProf::Thread#top_methods (Charlie Savage)
166
+ * Added RubyProf::Thread#total_time (Charlie Savage)
167
+ * Remove the -r and -e command line options. If you need specific libraries or code profiled then add them
168
+ to your code (Charlie Savage).
169
+ * Rewrite ruby-prof script to be more self-contained (Gary Weaver)
170
+ * Fix list formatting in readme (Thilo Rusche)
171
+ * Remove pause/resume support since its buggy and complicates the code
172
+
173
+ 0.11.3 (2012-12-27)
174
+ ======================
175
+ * Prefix c functions with prof_ to avoid name conflicts (Kenta Murata)
176
+ * Update ruby-prof script to avoid seg faults (Gary Weaver)
177
+ * Rakefile updates (Roger Pack)
178
+ * Fix regexp file reading (Gilbert Roulot)
179
+ * Update documentation (Timo Schilling)
180
+ * Fix up ruby warnings (Mike Gehard)
181
+ * Remove duplicate code (Chas Lemley)
182
+
183
+
184
+ 0.11.2 (2012-05-06)
185
+ ======================
186
+ * Fix compile issue with BOOL. Should be _Bool for C99.
187
+
188
+
189
+ 0.11.1 (2012-05-06)
190
+ ======================
191
+ * Added option --exclude-common-callbacks, plus exclude #map and #inject in common cycles (Vasily Fedoseyev)
192
+ * Add option --exclude-common-cycles to exclude common iterators (Vasily Fedoseyev)
193
+ * Allow method elimination from command line via '-x' and '-X' keys (Vasily Fedoseyev)
194
+
195
+
196
+ 0.11.0 (2012-05-05)
197
+ ======================
198
+ * Fix pause/resume so it actually works and add tests (David Barri)
199
+ * Resume now returns the result of the block when given (David Barri)
200
+ * Make recursive method explanation more clear (Charlie Savage)
201
+ * Fix ruby warnings (Charlie Savage)
202
+ * Toggle GC.enable_stats when profiling for memory to get the data (Vasily Fedoseyev)
203
+ * Fix patched ruby support and remove some warnings (Vasily Fedoseyev)
204
+ * Fix tests on 1.8.7 (rogerdpack)
205
+
206
+
207
+ 0.11.0.rc3 (2012-03-26)
208
+ ======================
209
+ * Include missing files in gemspec (Charlie Savage).
210
+
211
+
212
+ 0.11.0.rc2 (2012-03-25)
213
+ ======================
214
+ * Lots of improvements to Rack handler - this can be used to profile requests
215
+ in Rails and other rack-based ruby web frameworks (Charlie Savage).
216
+ * Reimplemented handling of recursive calls using CallInfoVisitor (Charlie Savage).
217
+ * Fix bug where child times were not correctly reported in complicated
218
+ call graphs with recursion like in frameworks like Rails (Charlie Savage).
219
+ * Add in recursive call information to Flat, Graph and Graph HTML reports (Charlie Savage).
220
+ * Add in new thread class add added RubyProf::Thread#top_method to
221
+ make report generation easier (Charlie Savage).
222
+ * Add in CallInfoVisitor class to make it easy to iterate over a call graph (Charlie Savage).
223
+ * Add in CallInfoPrinter to make it visualize RubyProf's internal call graphs (Charlie Savage).
224
+ * Significant updates to documentation (Charlie Savage).
225
+ * More c code cleanup (Charlie Savage).
226
+
227
+ 0.11.0.rc1 (2012-03-24)
228
+ ======================
229
+ * Big internal refactoring of C code to make RubyProf easier to understand and extend (Charlie Savage).
230
+ * Profile results are now returned as instances of a new class RubyProf::Profile. The old api
231
+ is supported via a compatability layer that at some point will be deprecated. (Charlie Savage).
232
+ * On Windows, use QueryPerformanceCounter and QueryPerformanceFrequency to measure CPU time instead
233
+ of rdtsc. This change is based on Microsoft's recommendation (Charlie Savage).
234
+ * On Windows use GetProcessTimes to return real PROCESS_TIME times instead of wall times (Charlie Savage).
235
+ * Split out tests for each time of measurement (cpu_time, process_time, etc.) (Charlie Savage).
236
+ * Dropped support for Ruby 1.8.4 and 1.8.6 and 1.9.0 (Charlie Savage).
237
+ * Added support for sorting results by total, self, wait and child times (Jan Suchal)
238
+ * Added tests for sorting behaviour & removed options from constructor to print method (Jan Suchal)
239
+ * Fix line number tests due to changes at top of file (Charlie Savage).
240
+ * Add encoding statement to top of all files for Ruby 1.9.x compatability (Charlie Savage).
241
+ * Add def file for VC to avoid the whole declspec annoyance (Charlie Savage).
242
+ * Update test suite to ensure current working directory is correct (Charlie Savage).
243
+ * Modernize gem file and remove various custom/home grown solutions that aren't needed anymore (Charlie Savage).
244
+ * Remove custom mingw build scripts, use rake compiler instead (Charlie Savage).
245
+ * Fixes for compiling with VC 2010 (Charlie Savage).
246
+
247
+ 0.10.8 (2011-07-06)
248
+ ======================
249
+ * 1.9.3 super class (Roger Pack)
250
+
251
+ 0.10.7 (2011-05-09)
252
+ ======================
253
+ * Fix a bug with REE's GC stats. Issue #53 [thanks graaff]
254
+
255
+ 0.10.6 (2011-04-29)
256
+ ======================
257
+ * Slightly more normalized url for linux/windows links to files.
258
+
259
+ 0.10.5 (2011-04-20)
260
+ =======================
261
+ * 1.8.6 compat for -v command (bug fix)
262
+
263
+ 0.10.4 (2011-04-20)
264
+ =======================
265
+ * Faster load time for ruby-prof itself.
266
+
267
+ 0.10.3
268
+ =======================
269
+ * Can cleanly load before rubygems now.
270
+
271
+ 0.10.2
272
+ =======================
273
+ * Fix for 1.9.2, os x for latest commits (thanks skaes!)
274
+
275
+ 0.10.1
276
+ =======================
277
+ * Fix bug in linux wall time, also load with only relative paths so that you can use it to benchmark rubygems startup overhead,
278
+ itself.
279
+
280
+ 0.10.0
281
+ =======================
282
+ * Some rdoc changes, for linux wall time attempt to use higher granularity (thanks to all the contributors for this round!)
283
+
284
+ 0.9.2
285
+ =======================
286
+ * Make graphviz work on 1.8.6
287
+ * Roll back some 1.9.2 optimizations until I can figure out what caused them.
288
+
289
+ 0.9.1
290
+ =======================
291
+ * Add a graphviz output
292
+
293
+ 0.9.0
294
+ =======================
295
+ * measurements for recursive methods are now correct
296
+ * gave up on splitting up recursive methods according to call depth
297
+ * made it possible to eliminate methods from profiling results
298
+ * new printer for call stack visualization
299
+ * new printer to print several profiles in one run
300
+ * HTML profiles contain Textmate links so you can jump to the source code easily
301
+ * producing an event log is now a runtime option
302
+
303
+ 0.7.10 (2009-01-22)
304
+ =======================
305
+ * fix SEGFAULT in 1.9
306
+ * add new printer flat_printer_with_line_numbers
307
+
308
+ 0.7.7 (2009-01-13)
309
+ ======================
310
+ * "fix" multi threading support for 1.9 http://redmine.ruby-lang.org/issues/show/2012
311
+ * speedups
312
+
313
+ 0.7.6 (2009-12-31)
314
+ ======================
315
+ * fix some tests for 1.9 (no real code changes)
316
+
317
+ 0.7.5 (2009-12)
318
+ ========================
319
+ * fix a GC collection bug (nobu's patch).
320
+ * correctly report recursive call depths (Kevin Scaldeferri).
321
+ * sort methods on output (Kevin Scaldeferri).
322
+
323
+ 0.7.3 (2008-12-09)
324
+ ========================
325
+ * Fixed compile error with new x86_64 code using GCC.
326
+
327
+ 0.7.2 (2008-12-08)
328
+ ========================
329
+ * Fixed major bug in printing child methods in graph reports.
330
+
331
+ * Fixes for supporting x86_64 machines (Diego Pettenò)
332
+
333
+
334
+ 0.7.1 (2008-11-28)
335
+ ========================
336
+ * Added new AggregateCallInfo class for printers to
337
+ make results easier to read. Take this call sequence
338
+ for example:
339
+
340
+ A B C
341
+ | | |
342
+ Z A A
343
+ | |
344
+ Z Z
345
+
346
+ By default, ruby-prof will show that Z was called by 3 separate
347
+ instances of A. In an IDE that is helpful but in a text report
348
+ it is not since it makes the report much harder to read.
349
+ As a result, printers now aggregate together callers (and children),
350
+ matching ruby-prof's output from versions prior to 0.7.0.
351
+
352
+ * Fixes for supporting x86_64 machines (Matt Sanford)
353
+
354
+
355
+ 0.7.0 (2008-11-04)
356
+ ========================
357
+
358
+ Features
359
+ --------
360
+ * Added two new methods - RubyProf.resume and RubyProf.pause.
361
+ RubyProf.resume takes an optional block, which ensures that
362
+ RubyProf.pause is called. For example:
363
+
364
+ 10.times do |i|
365
+ RubyProf.resume do
366
+ # Some long process
367
+ end
368
+ end
369
+
370
+ result = RubyProf.stop
371
+
372
+ * Added support for profiling tests that use Ruby's built-in
373
+ unit test framework (ie, test derived from
374
+ Test::Unit::TestCase). To enable profiling simply add
375
+ the following line of code to your test class:
376
+
377
+ include RubyProf::Test
378
+
379
+ By default, profiling results are written to the current
380
+ processes working directory. To change this, or other
381
+ profiling options, simply modify the PROFILE_OPTIONS hash
382
+ table as needed.
383
+
384
+ * Used the new support for profiling test cases to revamp
385
+ the way that Rails profiling works. For more information
386
+ please refer to RubyProf's documentation.
387
+
388
+ * Keep track of call stack for each method to enable more
389
+ powerful profile visualizations in Integrated Development
390
+ Environments (Hin Boean, work supported by CodeGear).
391
+
392
+ * Expose measurements to Ruby (Jeremy Kemper).
393
+
394
+ * Add support for additional memory measurements modes in Ruby 1.9 (Jeremy Kemper).
395
+
396
+ * Add support for Lloyd Hilaiel's Ruby patch for measuring total heap size.
397
+ See http://lloydforge.org/projects/ruby. (Jeremy Kemper).
398
+
399
+
400
+ Fixes
401
+ -------
402
+ * RubyProf.profile no longer crashes if an exception is
403
+ thrown during a profiling run.
404
+
405
+ * Measure memory in fractional kilobytes rather than rounding down (Jeremy Kemper)
406
+
407
+
408
+ 0.6.0 (2008-02-03)
409
+ ========================
410
+
411
+ ruby-prof 0.6.0 adds support for Ruby 1.9 and memory profiling.
412
+
413
+ Features
414
+ --------
415
+ * Added support for ruby 1.9 (Shugo Maeda)
416
+ * Added support for outputting printer results to a String, Array or IO
417
+ object (Michael Granger)
418
+ * Add new memory profiling mode. Note this mode depends on a
419
+ patched Ruby interpreter (Alexander Dymo)
420
+
421
+ Fixes
422
+ -------
423
+ * Improvements to GraphHtmlPrinter including updated documentation,
424
+ fixes for min_time support, ability to specify templates using
425
+ strings or filenames, and table layout fixes (Makoto Kuwata)
426
+ * Fixes to scaling factor for calltrees so that precision is not lost
427
+ due to the conversion to doubles (Sylvain Joyeux)
428
+ * Changed constant ALLOCATED_OBJECTS to ALLOCATIONS in the C code to
429
+ match the Ruby code (Sylvain Joyeux)
430
+ * Added support for calltree printer to ruby-prof binary script (Sylvain Joyeux)
431
+ * Fix support for the allocator measure mode to extconf.rb (Sylvain Joyeux)
432
+ * Honor measure mode when specified on the command line (Sylvain Joyeux)
433
+ * Sorting of methods by total time was incorrect (Dan Fitch, Charlie Savage)
434
+ * Fix ruby-prof to work with the latest version of GEMS (Alexander Dymo)
435
+ * Always define MEASURE_CPU_TIME and MEASURE_ALLOCATIONS in Ruby code, but
436
+ set their values to nil if the functionality is not available.
437
+
438
+
439
+ 0.5.2 (2007-07-19)
440
+ ========================
441
+
442
+ ruby-prof 0.5.2 is a bug fix release.
443
+
444
+ Fixes
445
+ -------
446
+ * Include missing rails plugin
447
+
448
+
449
+ 0.5.1 (2007-07-18)
450
+ ========================
451
+
452
+ ruby-prof 0.5.1 is a bug fix and performance release.
453
+
454
+ Performance
455
+ --------
456
+ * Significantly reduced the number of thread lookups by
457
+ caching the last executed thread.
458
+
459
+ Fixes
460
+ -------
461
+ * Properly escape method names in HTML reports
462
+ * Fix use of -m and --min-percent command line switches
463
+ * Default source file information to ruby_runtime#0 for c calls
464
+ * Moved rails_plugin to top level so it is more obvious
465
+ * Updated rails_plugin to write reports to the current
466
+ Rails log directory
467
+ * Added additional tests
468
+
469
+
470
+ 0.5.0 (2007-07-09)
471
+ ========================
472
+
473
+ Features
474
+ --------
475
+ * Added support for timing multi-threaded applications
476
+ * Added support for 64 bit systems (patch from Diego 'Flameeyes' Petten)
477
+ * Added suport for outputting data in the format used by
478
+ KCacheGrind (patch from Carl Shimer)
479
+ * Add filename and line numbers to call tree information (patch from Carl Shimer)
480
+ * Added Visual Studio 2005 project file.
481
+ * Added replace-progname switch, als rcov.
482
+ * Added better support for recursive methods
483
+ * Added better support for profiling Rails applications
484
+
485
+ Fixes
486
+ -------
487
+ * Fixes bug when the type of an attached object (singleton) is inherited
488
+ from T_OBJECT as opposed to being a T_OBJECT (identified by Francis Cianfrocca)
489
+ * ruby-prof now works in IRB.
490
+ * Fix sort order in reports.
491
+ * Fixed rdoc compile error.
492
+ * Fix tabs in erb template for graph html report on windows.
493
+
494
+ 0.4.1 (2006-06-26)
495
+ ========================
496
+
497
+ Features
498
+ --------
499
+ * Added a RubyProf.running? method to indicate whether a profile is in progress.
500
+ * Added tgz and zip archives to release
501
+
502
+ Fixes
503
+ -------
504
+ * Duplicate method names are now allowed
505
+ * The documentation has been updated to show the correct API usage is RubyProf.stop not RubyProf.end
506
+
507
+
508
+ 0.4.0 (2006-06-16)
509
+ ========================
510
+ Features
511
+ --------
512
+ * added support for call graphs
513
+ * added support for printers. Currently there is a FlatPrinter,
514
+ GraphPrinter and GraphHtmlPrinter.
515
+ * added support for recursive methods
516
+ * added Windows support
517
+ * now packaged as a RubyGem
518
+
519
+ Fixes
520
+ -------
521
+ * Fixes bug where RubyProf would crash depending on the
522
+ way it was invoked - for example, it did not run when
523
+ used with Arachno Ruby's customized version of Ruby.