Sha256: 4020feb27561aee59e3e06cd0480ba4a28683d35045e71f8fc143e0d02cecd22

Contents?: true

Size: 351 Bytes

Versions: 1

Compression:

Stored size: 351 Bytes

Contents

module Benches
  class Routine
    def initialize(instance, method, repetitions, *args)
      @instance = instance
      @method = method
      @repetitions = repetitions
      @args = args
    end

    def call
      Benchmark.measure do
        @repetitions.times do
          @instance.send(@method, *@args)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
benches-0.2.0 lib/benches/routine.rb