aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2017-07-24 10:26:30 -0500
committerschneems <richard.schneeman@gmail.com>2017-07-24 11:34:12 -0500
commitc4a286eb73291d3af33785331941f181f11163f8 (patch)
tree37f45e791db9a01205cde26e8dd3c3039916831b /railties
parent846832ae54f93a480f37a14a10874767a6330086 (diff)
downloadrails-c4a286eb73291d3af33785331941f181f11163f8.tar.gz
rails-c4a286eb73291d3af33785331941f181f11163f8.tar.bz2
rails-c4a286eb73291d3af33785331941f181f11163f8.zip
Include rack-mini-profiler by default
I've used many development related performance tools, but the single most consistently helpful tool is `rack-mini-profiler`. The tool provides a lightweight UI element for each page, that shows the server response time. When clicked it expands to show more detail: ![](https://www.dropbox.com/s/0aciw4mk8c059n0/Screenshot%202017-07-24%2010.24.24.png?dl=1) This can be used to detect expensive queries, N+1 issues and general performance related problems.
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG.md5
-rw-r--r--railties/lib/rails/generators/rails/app/templates/Gemfile2
2 files changed, 7 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 45e1f5f3ea..6a41f6221a 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Include `rack-mini-profiler` gem by default. This gem allows for easy
+ visability and diagnosis of performance related issues.
+
+ *Richard Schneeman*
+
* Support `-` as a platform-agnostic way to run a script from stdin with
`rails runner`
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile
index f49b503f85..f69b570db8 100644
--- a/railties/lib/rails/generators/rails/app/templates/Gemfile
+++ b/railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -46,6 +46,8 @@ group :development do
<%- else -%>
gem 'web-console', '>= 3.3.0'
<%- end -%>
+ # Display performance metrics on each page load. To configure for production read: https://github.com/MiniProfiler/rack-mini-profiler
+ gem 'rack-mini-profiler', '~> 0.10.5'
<%- end -%>
<% if depend_on_listen? -%>
gem 'listen', '>= 3.0.5', '< 3.2'