File tree Expand file tree Collapse file tree 4 files changed +21
-1
lines changed
Expand file tree Collapse file tree 4 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1+ group :profiling , optional : true do
2+ gem 'rack-mini-profiler'
3+
4+ # For memory profiling
5+ gem 'memory_profiler'
6+
7+ # For call-stack profiling flamegraphs
8+ gem 'stackprof'
9+ end
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Foreman::Consoletie < Rails::Railtie
5555 end
5656 end
5757 Bundler . require ( *Rails . groups )
58- optional_bundler_groups = %w[ assets ec2 fog libvirt openstack vmware redis ]
58+ optional_bundler_groups = %w[ assets ec2 fog libvirt openstack vmware redis profiling ]
5959 optional_bundler_groups . each do |group |
6060 Bundler . require ( group )
6161 rescue LoadError
Original file line number Diff line number Diff line change 1+ if defined? Rack ::MiniProfiler
2+ # enable profiling for all pages; per-default it is disabled on production-env
3+ Rack ::MiniProfiler . config . authorization_mode = SETTINGS . fetch ( :profiler_authorization_mode , :allow_all )
4+
5+ # enable additional profiling-features
6+ Rack ::MiniProfiler . config . enable_advanced_debugging_tools = true
7+ end
Original file line number Diff line number Diff line change 144144# :options:
145145# :compress: true
146146# :namespace: foreman
147+
148+ # set to :allow_authorized to not run rack-mini-profiler on all pages
149+ # see https://github.com/MiniProfiler/rack-mini-profiler#access-control-in-non-development-environments
150+ # :profiler_authorization_mode: :allow_all
You can’t perform that action at this time.
0 commit comments