Created
March 16, 2011 11:37
-
-
Save danlucraft/872355 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'jruby/profiler' | |
profile_data = JRuby::Profiler.profile do | |
# code to be profiled.... | |
end | |
my_output_stream = java.io.ByteArrayOutputStream.new | |
print_stream = java.io.PrintStream.new(my_output_stream) | |
profile_printer = JRuby::Profiler::GraphProfilePrinter.new(profile_data) | |
profile_printer.printProfile(print_stream) | |
result = my_output_stream.toString | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment