aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/bin/performance/request3
-rwxr-xr-xrailties/lib/commands/performance/request.rb7
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb2
4 files changed, 13 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index b09cbb3a59..99dc2c54d6 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Request profiler. [Jeremy Kemper]
+
* config/boot.rb correctly detects RAILS_GEM_VERSION. #9834 [alexch, thewoolleyman]
* Fixed incorrect migration number if script/generate executed outside of Rails root #7080 [jeremymcanally]
diff --git a/railties/bin/performance/request b/railties/bin/performance/request
new file mode 100644
index 0000000000..ae3f38c74b
--- /dev/null
+++ b/railties/bin/performance/request
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/performance/request'
diff --git a/railties/lib/commands/performance/request.rb b/railties/lib/commands/performance/request.rb
new file mode 100755
index 0000000000..8e19c9d6ed
--- /dev/null
+++ b/railties/lib/commands/performance/request.rb
@@ -0,0 +1,7 @@
+#!/usr/bin/env ruby
+RAILS_DEFAULT_LOGGER = nil
+require 'config/environment'
+require 'application'
+require 'action_controller/request_profiler'
+
+ActionController::RequestProfiler.run(ARGV)
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
index e78286495c..55c8bf3239 100644
--- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -67,7 +67,7 @@ class AppGenerator < Rails::Generator::Base
m.file "environments/test.rb", "config/environments/test.rb"
# Scripts
- %w( about console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/inspector runner server plugin ).each do |file|
+ %w( about console destroy generate performance/benchmarker performance/profiler performance/request process/reaper process/spawner process/inspector runner server plugin ).each do |file|
m.file "bin/#{file}", "script/#{file}", script_options
end