ruby-changes:6451
From: nobu <ko1@a...>
Date: Wed, 9 Jul 2008 11:13:55 +0900 (JST)
Subject: [ruby-changes:6451] Ruby:r17967 (trunk): * lib/profiler.rb (Profiler__#print_profile): sort in the descending
nobu 2008-07-09 11:13:41 +0900 (Wed, 09 Jul 2008) New Revision: 17967 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17967 Log: * lib/profiler.rb (Profiler__#print_profile): sort in the descending order of cumulative time. Modified files: trunk/ChangeLog trunk/lib/profiler.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 17966) +++ ChangeLog (revision 17967) @@ -1,3 +1,8 @@ +Wed Jul 9 11:13:39 2008 Nobuyoshi Nakada <nobu@r...> + + * lib/profiler.rb (Profiler__#print_profile): sort in the descending + order of cumulative time. + Wed Jul 9 11:11:18 2008 Nobuyoshi Nakada <nobu@r...> * dir.c (struct glob_args, rb_glob_caller, rb_glob2, push_pattern), Index: lib/profiler.rb =================================================================== --- lib/profiler.rb (revision 17966) +++ lib/profiler.rb (revision 17967) @@ -34,7 +34,7 @@ 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" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/