Sha256: 82cdc06c5fe9370f3b6d11f9c182b3d117057a98e7538dc04ceef2e9f32e659d

Contents?: true

Size: 530 Bytes

Versions: 3

Compression:

Stored size: 530 Bytes

Contents

require 'rubygems'
require 'benchmark'
require 'ruby-prof'

require_relative 'cache_runner'

RUNS = 1000
RubyProf.measure_mode = RubyProf::CPU_TIME

def run(obj)
  obj.prepare
  RubyProf.start
  obj.run
  result = RubyProf.stop
  puts "Results for #{obj.class.name}:"
  printer = RubyProf::FlatPrinter.new(result)
  printer.print(STDOUT)
end

create_database(RUNS)

run(FindRunner.new(RUNS))

run(FetchMissRunner.new(RUNS))

run(FetchHitRunner.new(RUNS))

run(DoubleFetchHitRunner.new(RUNS))

run(DoubleFetchMissRunner.new(RUNS))

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
identity_cache-0.0.6 performance/profile.rb
identity_cache-0.0.5 performance/profile.rb
identity_cache-0.0.4 performance/profile.rb