Rails: Benchmarking rails ActiveRecord Queries

Viewed 12909

I'm looking to benchmark a couple of my ActiveRecord requests in my app. What's the simplest way in the console to benchmark something like

User.find_by_name("Joe").id

versus

User.find(:first, :select => :id, :conditions => ["name = ?","Joe"]).id

Thanks

3 Answers
Related