Sha256: d4e8da0364f937d7158c9f9e95d5781230968c44911050195223c2d42e670e63

Contents?: true

Size: 254 Bytes

Versions: 2

Compression:

Stored size: 254 Bytes

Contents

require 'benchmark'

module Nitro
  
module BenchmarkMixin

  def benchmark(message = 'Benchmarking')
    real = Benchmark.realtime { yield }
    Logger.info "#{message}: time = #{'%.5f' % real} ms."
  end

end

end

# * George Moschovitis <gm@navel.gr>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.23.0 lib/nitro/mixin/benchmark.rb
nitro-0.24.0 lib/nitro/mixin/benchmark.rb