RubyProf, making profiling Ruby pretty since 1899!
[Source]
7: def profile(&b)
8: result = RubyProf.profile &b
9:
10: printer = RubyProf::GraphHtmlPrinter.new(result)
11: File::open('profile_results.html', 'w+') do |file|
12: printer.print(file, 0)
13: end
14: end