aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/profiler.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a37be1b82b..45d1b7f064 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 9 11:13:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/profiler.rb (Profiler__#print_profile): sort in the descending
+ order of cumulative time.
+
Wed Jul 9 11:11:18 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (struct glob_args, rb_glob_caller, rb_glob2, push_pattern),
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"