diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-09 02:13:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-09 02:13:41 +0000 |
commit | 5cba81a12d29690e067ae34be6054250aca949c0 (patch) | |
tree | 4aeff26a5875f6de3a601af2e405ce001e33fd4d /lib | |
parent | d59273052c04b9867a398ebd8591a2f9b186aa04 (diff) | |
download | ruby-5cba81a12d29690e067ae34be6054250aca949c0.tar.gz ruby-5cba81a12d29690e067ae34be6054250aca949c0.tar.xz ruby-5cba81a12d29690e067ae34be6054250aca949c0.zip |
* lib/profiler.rb (Profiler__#print_profile): sort in the descending
order of cumulative time.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/profiler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/profiler.rb b/lib/profiler.rb index 1067106be..a4b888909 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" |