Skip to content

Add option to ignore garbage collection frames with flamegraphs#599

Merged
nateberkopec merged 2 commits intoMiniProfiler:masterfrom
ihollander:flamegraph-ignore-gc
Dec 7, 2023
Merged

Add option to ignore garbage collection frames with flamegraphs#599
nateberkopec merged 2 commits intoMiniProfiler:masterfrom
ihollander:flamegraph-ignore-gc

Conversation

@ihollander
Copy link
Contributor

Fixes #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
Copy link
Collaborator

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.

@nateberkopec nateberkopec merged commit 710a5ed into MiniProfiler:master Dec 7, 2023
@ihollander ihollander deleted the flamegraph-ignore-gc branch December 7, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Ability to pass ignore_gc to StackProf.run

2 participants