aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-19 21:26:13 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-19 21:26:13 +0000
commit55ae2402f40c428307a1ac1e8a9f2800a4a2f1bf (patch)
treef422fe1b8f38a2a5335675828e0f235ce045b3ec
parent65ad154e2ab959c7b57e566866500b874e6d253a (diff)
downloadruby-55ae2402f40c428307a1ac1e8a9f2800a4a2f1bf.tar.gz
* tool/rdocbench.rb: add summary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--tool/rdocbench.rb22
2 files changed, 18 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 23c1b711b4..e5dc432fc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jun 20 06:25:39 2013 Koichi Sasada <ko1@atdot.net>
+
+ * tool/rdocbench.rb: add summary.
+
Thu Jun 20 06:18:01 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (gc_profile_total_time): check objspace->profile.next_index > 0.
diff --git a/tool/rdocbench.rb b/tool/rdocbench.rb
index 946d646431..f325f6a187 100644
--- a/tool/rdocbench.rb
+++ b/tool/rdocbench.rb
@@ -10,13 +10,19 @@ Dir.mktmpdir('rdocbench-'){|d|
args << '--op' << dir
GC::Profiler.enable
- Benchmark.bm{|x|
- x.report('rdoc'){
- r = RDoc::RDoc.new
- r.document args
- GC::Profiler.report
- pp GC.stat
- puts "GC Total Time:#{GC::Profiler.total_time}"
- }
+ tms = Benchmark.measure{|x|
+ r = RDoc::RDoc.new
+ r.document args
}
+ GC::Profiler.report
+ pp GC.stat
+ puts
+ puts Benchmark::CAPTION
+ puts tms
+ puts "GC total time (sec): #{GC::Profiler.total_time}"
+ puts
+ puts "Summary (ruby): #{RUBY_DESCRIPTION})"
+ puts "Summary (real): #{tms.real} sec"
+ puts "Summary (gctm): #{GC::Profiler.total_time} sec"
+ puts "Summary (gc#) : #{GC.count}"
}