mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
Modify bench-profile to allow generating better flamegraphs
With these settings I can see much more clearly which functions are major contributors in flamegraphs -- using default profile has heavy inlining which obfuscates things.
This commit is contained in:
@@ -140,14 +140,14 @@ cargo tarpaulin -o html
|
||||
Run benchmarks:
|
||||
|
||||
```console
|
||||
cargo bench
|
||||
cargo bench --profile bench-profile --bench benchmark
|
||||
```
|
||||
|
||||
Run benchmarks and generate flamegraphs:
|
||||
|
||||
```console
|
||||
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
|
||||
cargo bench --bench benchmark -- --profile-time=5
|
||||
cargo bench --profile bench-profile --bench benchmark -- --profile-time=5
|
||||
```
|
||||
|
||||
## Debugging bugs
|
||||
|
||||
@@ -126,6 +126,8 @@ lto = true
|
||||
[profile.bench-profile]
|
||||
inherits = "release"
|
||||
debug = true
|
||||
lto = false # LTO hides function boundaries
|
||||
codegen-units = 16 # Less cross-unit inlining
|
||||
|
||||
[profile.dist]
|
||||
inherits = "release"
|
||||
|
||||
Reference in New Issue
Block a user