mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
script/performance/profiler should require environment
This commit is contained in:
@@ -3,10 +3,6 @@ if ARGV.empty?
|
||||
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"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<%= shebang %>
|
||||
require File.expand_path('../../../config/application', __FILE__)
|
||||
require File.expand_path('../../../config/environment', __FILE__)
|
||||
require 'rails/commands/performance/profiler'
|
||||
|
||||
Reference in New Issue
Block a user