Sha256: eeb90763557f6e51405cace42059637b60b899dcb80e1d1ad470e5c14337513c

Contents?: true

Size: 429 Bytes

Versions: 14

Compression:

Stored size: 429 Bytes

Contents

require 'rubygems'
require 'ruby-prof'
require "#{File.dirname(__FILE__)}/lib/redis"


mode = ARGV.shift || 'process_time'
n = (ARGV.shift || 200).to_i

r = Redis.new
RubyProf.measure_mode = RubyProf.const_get(mode.upcase)
RubyProf.start

n.times do |i|
  key = "foo#{i}"
  r[key] = key * 10
  r[key]
end

results = RubyProf.stop
File.open("profile.#{mode}", 'w') do |out|
  RubyProf::CallTreePrinter.new(results).print(out)
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
lunar-0.4.1 vendor/redis/profile.rb
lunar-0.4.0 vendor/redis/profile.rb
lunar-0.3.0 vendor/redis/profile.rb
lunar-0.2.3 vendor/redis/profile.rb
lunar-0.2.2 vendor/redis/profile.rb
lunar-0.2.1 vendor/redis/profile.rb
lunar-0.2.0 vendor/redis/profile.rb
lunar-0.1.1 vendor/redis/profile.rb
lunar-0.1.0 vendor/redis/profile.rb
vanity-1.3.0 vendor/redis-rb/profile.rb
mikeg-vanity-1.3.0 vendor/redis-rb/profile.rb
vanity-1.2.0 vendor/redis-rb/profile.rb
vanity-1.1.1 vendor/redis-rb/profile.rb
vanity-1.1.0 vendor/redis-rb/profile.rb