Episodes
someone PRO said 3 months ago on Benchmark Ruby Code :
Rails has now added a benchmark generator which is pretty helpful.

rails g benchmark some_benchmark

it creates the file at 
script/benchmarks/some_benchmark.rb

It should automatically add the ips-benchmark gem to your gemfile after running bundle but if it doesn't just add it under the development section in your gemfile.  

run it in the terminal by doing 
ruby script/benchmarks/some_benchmark.rb

since it loads config/environment.rb in the benchmark file all models are accessible. 


Login to Comment