Skip to content

Commit

Permalink
feat(profiler): support performance profiling via pprof (#768)
Browse files Browse the repository at this point in the history
* feat: support performance profiling via pprof

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
```

* refactor(profiling): clean up implementation

* feat(ci): run profiler

* fix(ci): fetch all the history for profiler

* docs(website): add profiling docs

---------

Co-authored-by: Orhun Parmaksız <[email protected]>
  • Loading branch information
aminya and orhun authored Jul 29, 2024
1 parent c208a97 commit 35dc1e4
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,21 @@ jobs:
exit 1
fi
done
profiler:
name: Run profiler
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run profiler
run: cargo run --profile bench --features profiler -- --no-exec
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: git-cliff.${{ github.run_id }}-profiler-report
path: git-cliff.**.flamegraph.svg
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

# Backup files generated by rustfmt
**/*.rs.bk

*.flamegraph.svg
Loading

0 comments on commit 35dc1e4

Please sign in to comment.