Skip to content
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

allow flamegraph gathering #9423

Merged
merged 4 commits into from Apr 3, 2024
Merged

Conversation

jakecoffman
Copy link
Member

To debug customer performance issues, this adds the ability to request a flamegraph be generated.

The CLI PR that will enable this is dependabot/cli#299.

I tested this with the command dependabot update bundler dependabot/dependabot-core --directory updater --flamegraph --dep vcr and it produced a nice flamegraph!

@jakecoffman jakecoffman requested a review from a team as a code owner April 3, 2024 14:41
@pavera
Copy link
Contributor

pavera commented Apr 3, 2024

When I was looking into this it seemed stackprof could generate flamegraphs itself, though that required a command run on the shell against a profile. I wonder if it might be useful though to get both the raw profile and the flamegraph? I'm not sure what else we could do with raw profile data so it probably makes sense to just get the flamegraph for now.

@@ -35,6 +35,9 @@ gem "sentry-opentelemetry", "~> 5.16"
gem "sentry-ruby", "~> 5.16"
gem "terminal-table", "~> 3.0.2"

gem "flamegraph", "~> 0.9.5"
gem "stackprof", "~> 0.2.16"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is already in common, since we have the functionality in the dry-run script:

spec.add_development_dependency "stackprof", "~> 0.2.16"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you recommend I remove it here and switch that line in common to be spec.add_dependency?

@jakecoffman
Copy link
Member Author

jakecoffman commented Apr 3, 2024

I want to move forward with this so I can continue debugging issues. We can refine how this is defined in the gemspecs/Gemfile and how the flamegraph is actually generated, feel free to improve on it going forward or let me know and I can make more PRs!

@jakecoffman jakecoffman merged commit ffc8546 into main Apr 3, 2024
121 checks passed
@jakecoffman jakecoffman deleted the jakecoffman/flamegraph-support branch April 3, 2024 17:05
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.

None yet

4 participants