Sha256: ea7ca6750a7e84c9873abec7e0cbb9264536500ea38870a14a84e6ba8d007d2c

Contents?: true

Size: 400 Bytes

Versions: 7

Compression:

Stored size: 400 Bytes

Contents

# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
# This is free software with ABSOLUTELY NO WARRANTY.
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.

require 'benchmark'

module BenchmarkModule
  def benchmark
    result = nil
    Benchmark.bm {|x|
      x.report { 
	result = yield 
      }
    }
    return result
  end

  module_function :benchmark
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
qwik2md-2.0.1 vendor/qwik/lib/qwik/bench-module-session.rb
qwik2md-2.0.0 vendor/qwik/lib/qwik/bench-module-session.rb
qwik2md-1.0.2 vendor/qwik/lib/qwik/bench-module-session.rb
qwik2md-1.0.1 vendor/qwik/lib/qwik/bench-module-session.rb
qwik2md-1.0.0 vendor/qwik/lib/qwik/bench-module-session.rb
qwik2md-0.1.0 vendor/qwik/lib/qwik/bench-module-session.rb
qwikdoc-0.0.1 vendor/qwik/bench-module-session.rb