Skip to content

Commit

Permalink
docs: add a section about profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonz committed Sep 15, 2023
1 parent 33087bc commit 21921cf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,21 @@ you can submit a PR based on the `gh-pages` branch of
The `.rs` files generated from `.proto` files are included in the repository,
and there is a GitHub CI check that will complain if they do not match.
## Profiling
One easy-to-use sampling profiler
is [samply](https://github.com/mstange/samply). For example:
```shell
cargo install samply
samply record jj diff
```
Then just open the link it prints.
Another option is to use the instrumentation we've added manually (using
`tracing::instrument`) in various places. For example:
```shell
JJ_TRACE=/tmp/trace.json jj diff
```
Then go to `https://ui.perfetto.dev/` in Chrome and load `/tmp/trace.json` from
there.

0 comments on commit 21921cf

Please sign in to comment.