From 71b1673229c57cd44b2ffe79bb094cfb986fbeca Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 9 Jul 2008 02:13:41 +0000 Subject: * lib/profiler.rb (Profiler__#print_profile): sort in the descending order of cumulative time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/profiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/profiler.rb b/lib/profiler.rb index 1067106be4..a4b8889093 100644 --- a/lib/profiler.rb +++ b/lib/profiler.rb @@ -34,7 +34,7 @@ module_function total = Process.times[0] - @@start if total == 0 then total = 0.01 end data = @@map.values - data = data.sort_by{|x| x[2]} + data = data.sort_by{|x| -x[2]} sum = 0 f.printf " %% cumulative self self total\n" f.printf " time seconds seconds calls ms/call ms/call name\n" -- cgit v1.2.3