GC::Profiler.result gives a String report but there is no access to the raw profile data. There is no way to extract data for automatic comparison without parsing the output String.
The attached patch adds GC::Profile.data which exposes gc_profile_record_get.
This allows tools that can automatically compare profile runs to be written without parsing.
ruby -v changed from ruby 1.9.3dev (2011-07-08 trunk 32440) [x86_64-darwin10.8.0] to -
Hi,
In message "Re: [ruby-core:39357] [Ruby 1.9 - Bug #4991] Add a method to retrieve raw data from GC::Profiler"
on Thu, 8 Sep 2011 11:51:42 +0900, Narihiro Nakamura authorNari@gmail.com writes:
|I like GC::Profiler.raw_data.
|
|Matz, What do you think?
This issue was solved with changeset r33224.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
patch by Eric Hodel. [ruby-core:37857] [Bug #4991]