-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] enable profiling in production (#1449)
* [feature] enable profiling in production (#1448) ## Shows application profiling When enabled, shows profiling information to admin users <img width="1728" alt="Screen Shot 2023-03-10 at 6 27 18 PM" src="https://user-images.githubusercontent.com/35935196/224448480-6cf1f7ec-e48d-4c9b-8a88-df1de8b5571a.png"> ## Permissions Ensure user has `show profiler` permission <img width="1728" alt="Screen Shot 2023-03-10 at 6 28 13 PM" src="https://user-images.githubusercontent.com/35935196/224448545-ea9afe62-e68d-4681-a332-7c98fc5d251c.png"> ## Profiling configuration Append `?pp=help` to access the profiling help page <img width="1728" alt="Screen Shot 2023-03-10 at 6 27 41 PM" src="https://user-images.githubusercontent.com/35935196/224448618-c8eebc9f-b845-43c8-931f-0d9f25218a76.png"> ## Improve app performance! Use instrumentation to track down performance bottlenecks and improve app performance <img width="1728" alt="Screen Shot 2023-03-10 at 6 29 32 PM" src="https://user-images.githubusercontent.com/35935196/224448636-d6d0bb5e-3597-4b9e-8b6d-f7487eb88d04.png"> * add permissions (#1450) Co-authored-by: donrestarone <[email protected]> --------- Co-authored-by: donrestarone <[email protected]>
- Loading branch information
1 parent
96d21fc
commit a4b22bc
Showing
10 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
require "rack-mini-profiler" | ||
|
||
# initialization is skipped so trigger it | ||
Rack::MiniProfilerRails.initialize!(Rails.application) | ||
Rack::MiniProfiler.config.position = 'bottom-right' | ||
Rack::MiniProfiler.config.authorization_mode = :allow_authorized | ||
Rack::MiniProfiler.config.enable_hotwire_turbo_drive_support = true | ||
Rack::MiniProfiler.config.enable_advanced_debugging_tools = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddShowProfilerToUsers < ActiveRecord::Migration[6.1] | ||
def change | ||
add_column :users, :show_profiler, :boolean, default: false | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.