]>
git.saurik.com Git - redis.git/blob - client-libraries/ruby/profile.rb
3 require "#{File.dirname(__FILE__)}/lib/redis"
6 mode
= ARGV.shift
|| 'process_time'
7 n
= (ARGV.shift
|| 200).to_i
10 RubyProf
.measure_mode
= RubyProf
.const_get(mode
.upcase
)
19 results
= RubyProf
.stop
20 File
.open("profile.#{mode}", 'w') do |out
|
21 RubyProf
::CallTreePrinter.new(results
).print(out
)