Sha256: 2069788bcba372713a0b518a90f6c2aa5be467ed84b9051d1ed66578beefdc4a
Contents?: true
Size: 544 Bytes
Versions: 8
Compression:
Stored size: 544 Bytes
Contents
dir = File.dirname(__FILE__) require File.expand_path("#{dir}/../lib/rr") require "benchmark" o = Object.new Benchmark.bm do |x| x.report do 1000.times do RR.mock(o).foobar.returns("baz") o.foobar RR.reset end end end #require "ruby-prof" #RubyProf.start # ##RR.mock(o).foobar.returns("baz") ##o.foobar #10.times do # RR.mock(o).foobar.returns("baz") # o.foobar # RR.reset #end # #result = RubyProf.stop # ## Print a flat profile to text #printer = RubyProf::FlatPrinter.new(result) #printer.print(STDOUT, 0)
Version data entries
8 entries across 4 versions & 2 rubygems