Skip to content

Instantly share code, notes, and snippets.

@jaimerson
Created August 1, 2016 21:54
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 jaimerson/79b07bbc04ddda01ad97b7cddacd40f1 to your computer and use it in GitHub Desktop.
Save jaimerson/79b07bbc04ddda01ad97b7cddacd40f1 to your computer and use it in GitHub Desktop.
Final benchmark bikes
Benchmark.bm do |x|
x.report(:naive) { BikesReport::NaiveApproach.new.to_a }
x.report(:ar_and_sql) { BikesReport::ActiveRecordSqlApproach.new.to_a }
x.report(:view) { BikesReport::ViewApproach.new.to_a }
end
# user system total real
# 9.430000 0.650000 10.080000 ( 10.306346)
# 0.020000 0.000000 0.020000 ( 0.125085)
# 0.010000 0.000000 0.010000 ( 0.011208)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment