script/performance/benchmarker should require environment
This commit is contained in:
parent
7635c9f4c0
commit
2f7217c76a
|
@ -12,7 +12,6 @@ end
|
|||
|
||||
require 'benchmark'
|
||||
include Benchmark
|
||||
Rails.initialize!
|
||||
|
||||
# Don't include compilation in the benchmark
|
||||
ARGV.each { |expression| eval(expression) }
|
||||
|
@ -21,4 +20,4 @@ bm(6) do |x|
|
|||
ARGV.each_with_index do |expression, idx|
|
||||
x.report("##{idx + 1}") { N.times { eval(expression) } }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<%= shebang %>
|
||||
require File.expand_path('../../../config/application', __FILE__)
|
||||
require File.expand_path('../../../config/environment', __FILE__)
|
||||
require 'rails/commands/performance/benchmarker'
|
||||
|
|
Loading…
Reference in New Issue