Sha256: c0a1daa26109158355a509dc4e333500f32e2b142fe71242853358f6c4544fbd
Contents?: true
Size: 419 Bytes
Versions: 1
Compression:
Stored size: 419 Bytes
Contents
module Benches class Routine def initialize(instance, method, repetitions, *args) @instance = instance @method = method @repetitions = repetitions @args = args end def call Benchmark.bm(@method.length) do |x| x.report("#{@method}:") do @repetitions.times do @instance.send(@method, *@args) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
benches-0.1.0 | lib/benches/routine.rb |