-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat(profiler): support performance profiling via pprof #768
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #768 +/- ##
==========================================
- Coverage 36.89% 36.34% -0.55%
==========================================
Files 19 20 +1
Lines 1502 1522 +20
==========================================
- Hits 554 553 -1
- Misses 948 969 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2cc44b4
to
235d0fb
Compare
This adds support for performance profiling that allows for finding the bottlenecks and performance optimizations. It can be enabled via `profiler` feature and the `bench` build profile. ```shell cargo build --profile=bench --features=profiler ```
235d0fb
to
24814ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loved this PR, thanks a lot! <3
I cleaned up the implementation in 88f93dd, can you take a look and let me know how it looks?
Also, I'm thinking of adding documentation for how to run the profiler. I'm guessing it will be just running cargo run
with the profiler features, right?
Also added a CI step so the profiler reports are downloadable for each run. e.g. https://github.com/orhun/git-cliff/actions/runs/10131242627/artifacts/1748030753 |
You're welcome! The changes look good to me. The CI step would help catching performance regressions in future. As for the documentation, I suggest the following: Performance ProfilingGit-cliff can be built with performance profiling instrumentation, which helps with finding bottlenecks. The profiler can be enabled via the cargo build --profile=bench --features=profiler |
Awesome, thanks! |
Description
This adds support for performance profiling, allowing for finding bottlenecks and performance optimizations.
It can be enabled via
profiler
feature and thebench
build profile.Motivation and Context
This allows for debugging performance issues such as #767
How Has This Been Tested?
I tested on the repo mentioned in #767
Screenshots / Logs (if applicable)
This screenshot shows that Git Cliff doesn't have any caching, and it goes over the whole history every time no matter what in the subsequent calls.
Types of Changes
Checklist: