add notes re. profiling
This commit is contained in:
parent
1d128c1289
commit
c00b8b7f9f
24
README.md
24
README.md
@ -378,6 +378,30 @@ These are desired for the next DB format:
|
|||||||
- Compress strings with fsst.
|
- Compress strings with fsst.
|
||||||
- Trim first 4 bytes from the cmph headers.
|
- Trim first 4 bytes from the cmph headers.
|
||||||
|
|
||||||
|
Profiling
|
||||||
|
---------
|
||||||
|
|
||||||
|
Prepare `profile.data`:
|
||||||
|
|
||||||
|
```
|
||||||
|
zig build -Drelease-small=true
|
||||||
|
perf record --call-graph=dwarf \
|
||||||
|
zig-out/bin/turbo-unix2db --passwd passwd2 --group group2
|
||||||
|
```
|
||||||
|
|
||||||
|
Perf interactive:
|
||||||
|
|
||||||
|
```
|
||||||
|
perf report -i perf.data
|
||||||
|
```
|
||||||
|
|
||||||
|
Flame graph:
|
||||||
|
|
||||||
|
```
|
||||||
|
perf script | inferno-collapse-perf > stacks.folded
|
||||||
|
inferno-flamegraph stacks.folded > profile.svg
|
||||||
|
```
|
||||||
|
|
||||||
[git-subtrac]: https://apenwarr.ca/log/20191109
|
[git-subtrac]: https://apenwarr.ca/log/20191109
|
||||||
[cmph]: http://cmph.sourceforge.net/
|
[cmph]: http://cmph.sourceforge.net/
|
||||||
[id]: https://linux.die.net/man/1/id
|
[id]: https://linux.die.net/man/1/id
|
||||||
|
Loading…
Reference in New Issue
Block a user