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 14, 2023
1 parent 2c74fa8 commit c0433b9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,20 @@ 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 `chrome://tracing` in Chrome and load `/tmp/trace.json` from there.

0 comments on commit c0433b9

Please sign in to comment.