e8804fe1bfdd69cdd8eff932fe15b9d3ecb29636
2 puts
"Usage: ./script/performance/benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..."
7 N
= Integer(ARGV.first
)
13 require RAILS_ROOT
+ '/config/environment'
17 # Don't include compilation in the benchmark
18 ARGV.each
{ |expression
| eval(expression
) }
21 ARGV.each_with_index
do |expression
, idx
|
22 x
.report("##{idx + 1}") { N
.times
{ eval(expression
) } }