Skip to content

Refactor parameter query settings into its own class #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add back logic for handling results/snapshot/flamegraph. not sure why…
… i removed it in b293550
  • Loading branch information
technicalpickles committed Feb 15, 2024
commit ad0e68444ad2a91dba36414f73b70512089e2818
13 changes: 12 additions & 1 deletion lib/mini_profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ def call(env)
# handle all /mini-profiler requests here
if path.start_with? @config.base_url_path
file_name = path.sub(@config.base_url_path, '')

case file_name
when 'results'
return serve_results(env)
when 'snapshots'
self.current = nil
return serve_snapshot(env)
when 'flamegraph'
return serve_flamegraph(env)
else
return client_settings.handle_cookie(serve_file(env, file_name: file_name))
end
end

if query_settings.manual_disable? || client_settings.disable_profiling?
Expand All @@ -202,7 +214,6 @@ def call(env)
# remember that profiling is not disabled (ie enabled)
client_settings.disable_profiling = false

# profile gc
if query_settings.profile_gc?
current.measure = false if current
return serve_profile_gc(env, client_settings)
Expand Down