[perf] Update README

This commit is contained in:
Behdad Esfahbod 2022-06-30 13:50:18 -06:00
parent f6f93c30f3
commit 031fd20a5a
1 changed files with 12 additions and 4 deletions

View File

@ -6,14 +6,22 @@ To build the benchmarks in this directory you need to set the benchmark
option while configuring the build with meson:
```
meson configure build -Dbenchmark=enabled --buildtype=release
meson build -Dbenchmark=enabled --buildtype=release
```
or:
```
meson build -Dbenchmark=enabled --buildtype=debugoptimized
```
Then build the benchmark binaries with ninja:
Then build a specific benchmark binaries with ninja:
```
ninja -Cbuild perf/benchmark-set
```
or just build the whole project:
```
ninja -Cbuild
```
Finally, to run one of the benchmarks:
@ -37,10 +45,10 @@ ninja -Cbuild
Then run the benchmark with perf:
```
perf record -g -o ~/tmp/profiles/subset.prof ./build/perf/benchmark-subset --benchmark_filter="BM_subset_codepoints/subset_notocjk/100000" --benchmark_repetitions=5
perf record -g build/perf/benchmark-subset --benchmark_filter="BM_subset_codepoints/subset_notocjk/100000" --benchmark_repetitions=5
```
You probably want to filter to a specific benchmark of interest and set the number of repititions high enough to get a good sampling of profile data.
Finally view the profile with:
perf report -i ~/tmp/profiles/subset.prof
perf report