Skip to content

Instantly share code, notes, and snippets.

@ciaranarcher
Created November 23, 2011 10:44
Show Gist options
  • Save ciaranarcher/1388408 to your computer and use it in GitHub Desktop.
Save ciaranarcher/1388408 to your computer and use it in GitHub Desktop.
Profiling Example
profile_data = JRuby::Profiler.profile do
results = SIA::SIAModels::Client.get_all
results.each do |c|
puts "#{c[:clientid]} #{c[:firstname]} #{c[:status]} #{c[:customersince]} #{c[:emailactive]}"
end
end
profile_printer = JRuby::Profiler::GraphProfilePrinter.new(profile_data)
profile_printer.printProfile(STDOUT)
10:43:02,472 INFO [stdout] (http-127.0.0.1-127.0.0.1-8080-1) %total %self total self children calls name
10:43:02,474 INFO [stdout] (http-127.0.0.1-127.0.0.1-8080-1) ---------------------------------------------------------------------------------------------------------
10:43:02,475 INFO [stdout] (http-127.0.0.1-127.0.0.1-8080-1) 100% 100% 0.00 0.00 0.00 0 (top)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment