Skip to content

Instantly share code, notes, and snippets.

@nmeylan
Created December 18, 2014 20:04
Show Gist options
  • Save nmeylan/fb323b3b7611b0903fd0 to your computer and use it in GitHub Desktop.
Save nmeylan/fb323b3b7611b0903fd0 to your computer and use it in GitHub Desktop.
Ruby benchmark template
require 'Benchmark'
ITERATION = 100_000
Benchmark.bm(27) do |bm|
bm.report('TEST 1') do
ITERATION.times do
# test 1 content
end
end
bm.report('TEST 2') do
ITERATION.times do
# test 2 content
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment