Skip to content

Instantly share code, notes, and snippets.

@shakemurasan
Created June 4, 2016 09:22
Show Gist options
  • Save shakemurasan/d78ed9087eec74cc356c226280b642be to your computer and use it in GitHub Desktop.
Save shakemurasan/d78ed9087eec74cc356c226280b642be to your computer and use it in GitHub Desktop.
require 'benchmark'
def measure_do
result = Benchmark.measure do
yield
end
puts Benchmark::CAPTION
puts result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment