Module: ApiValve::Benchmarking

Included in:
Forwarder
Defined in:
lib/api_valve/benchmarking.rb

Instance Method Summary collapse

Instance Method Details

#benchmarkObject



3
4
5
6
7
8
9
# File 'lib/api_valve/benchmarking.rb', line 3

def benchmark
  result = nil
  time = Benchmark.realtime do
    result = yield
  end
  [result, time]
end