MiniProfiler / rack-mini-profiler

Profiler for your development and production Ruby rack apps.
MIT License
3.68k stars 400 forks source link

Add option to ignore garbage collection frames with flamegraphs #599

Closed ihollander closed 7 months ago

ihollander commented 7 months ago

Fixes https://github.com/MiniProfiler/rack-mini-profiler/issues/514

This adds a configuration option to ignore garbage collection via the ignore_gc option in StackProf. Users can override this configuration on a per-request basis via the flamegraph_ignore_gc query param.

I tested this change out on a separate app using this branch and confirmed garbage collection frames were visible by default, and hidden after setting Rack::MiniProfiler.config.flamegraph_ignore_gc = true or using the query param.

nateberkopec commented 7 months ago

Something I've wanted for a long time! I know I just did a release but this is too useful to let set on main for a long time. I'll just do another minor version.