script/performance/benchmarker should require environment

This commit is contained in:
Joshua Peek 2009-10-16 19:28:56 -05:00
parent 7635c9f4c0
commit 2f7217c76a
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -1,3 +1,3 @@
<%= shebang %>
require File.expand_path('../../../config/application', __FILE__)
require File.expand_path('../../../config/environment', __FILE__)
require 'rails/commands/performance/benchmarker'