mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
b1bbe884cd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
22 lines
399 B
Ruby
22 lines
399 B
Ruby
|
|
require 'rdoc/rdoc'
|
|
require 'tmpdir'
|
|
require 'benchmark'
|
|
require 'pp'
|
|
|
|
Dir.mktmpdir('rdocbench-'){|d|
|
|
dir = File.join(d, 'rdocbench')
|
|
args = ARGV.dup
|
|
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}"
|
|
}
|
|
}
|
|
}
|