Skip to content

Instantly share code, notes, and snippets.

@g-ilham
Last active September 25, 2015 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g-ilham/38989441ceade9ec04b2 to your computer and use it in GitHub Desktop.
Save g-ilham/38989441ceade9ec04b2 to your computer and use it in GitHub Desktop.
benchmark

require 'benchmark'

cube = Cube.find(93)

Benchmark.bmbm do |x|
  x.report("all_cube_images") { Image.all_cube_images(1, 93) }
  x.report("cube.images")  { cube.images  }
end.each do |el|
  puts el.real
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment