Skip to content

Commit 278ce1c

Browse files
authored
Contributing guide: expand on samply (#26)
1 parent 4429fc6 commit 278ce1c

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,30 @@ To carry out this optimization cycle, we recommend the following profiling tools
5454
* [Dhat](https://crates.io/crates/dhat): Measures memory allocations within the application.
5555

5656
### Hyperfine
57+
5758
Once [installed](https://github.com/sharkdp/hyperfine?tab=readme-ov-file#installation), we can simply run:
5859
```sh
5960
hyperfine 'TODO(template) update with your binary e.g. ./target/release/...'
6061
```
6162
### Samply
63+
64+
Samply creates [flame graphs](https://www.youtube.com/watch?v=D53T1Ejig1Q&t=813s) and detailed call stacks with a browser-based [Firefox Profiler](https://profiler.firefox.com/).
65+
6266
Run
6367
```sh
6468
cargo install --locked samply
6569
```
66-
Please remember to add:
67-
```rust
70+
71+
You [may need](https://github.com/mstange/samply/?tab=readme-ov-file#description) to grant some system access to `samply`.
72+
73+
Into your `Cargo.toml` to add debug symbols in profiling mode:
74+
75+
```toml
6876
[profile.profiling]
6977
inherits = "release"
7078
debug = true
7179
```
72-
Into your `Cargo.toml` to add debug symbols in profiling mode.
80+
7381
Otherwise, reading the output will be impossible.
7482

7583
Then, we can run:

0 commit comments

Comments
 (0)