diff --git a/perf/README.md b/perf/README.md index c1b5f77ff..91f493514 100644 --- a/perf/README.md +++ b/perf/README.md @@ -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