提交 8f2d8f45 编写于 作者: J Joshua Peek

script/performance/profiler should require environment

上级 2f7217c7
......@@ -3,10 +3,6 @@
exit(1)
end
# Keep the expensive require out of the profile.
$stderr.puts 'Loading Rails...'
Rails.initialize! # Initialize the application
# Define a method to profile.
if ARGV[1] and ARGV[1].to_i > 1
eval "def profile_me() #{ARGV[1]}.times { #{ARGV[0]} } end"
......
<%= shebang %>
require File.expand_path('../../../config/application', __FILE__)
require File.expand_path('../../../config/environment', __FILE__)
require 'rails/commands/performance/profiler'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册