harfbuzz/perf
Behdad Esfahbod 4cb441dfd1 [benchmark-subset] Add AdobeVFPrototype 2022-11-26 15:23:07 -07:00
..
fonts [perf] Make subset benchmark data driven. 2022-05-10 14:30:08 -06:00
texts [perf] Add Hindi test to benchmark-shape 2022-11-23 20:15:16 -07:00
Makefile.am [perf] Add benchmark-ot 2022-05-17 13:12:17 -06:00
README.md [perf] Update README 2022-06-30 14:09:09 -06:00
benchmark-font.cc [benchmark-font] Disable quadratic callback 2022-06-27 12:10:16 -06:00
benchmark-map.cc Include cassert to fix bots 2022-05-30 05:09:53 -06:00
benchmark-ot.cc [perf/benchmark-ot] Add zh-hans 2022-05-18 11:16:46 -06:00
benchmark-set.cc [benchmark-set] Another Pause/Resume 2022-05-30 05:54:20 -06:00
benchmark-shape.cc [perf] Add Hindi test to benchmark-shape 2022-11-23 20:15:16 -07:00
benchmark-subset.cc [benchmark-subset] Add AdobeVFPrototype 2022-11-26 15:23:07 -07:00
meson.build [perf/benchmark-shape] Test ft font backend as well 2022-05-23 14:36:06 -06:00
run.sh [perf] More rename 2019-12-10 12:43:42 -06:00

README.md

Building and Running

Benchmarks are implemented using Google Benchmark.

To build the benchmarks in this directory you need to set the benchmark option while configuring the build with meson:

meson build -Dbenchmark=enabled --buildtype=release

or:

meson build -Dbenchmark=enabled --buildtype=debugoptimized

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:

./build/perf/benchmark-set

It's possible to filter the benchmarks being run and customize the output via flags to the benchmark binary. See the Google Benchmark User Guide for more details.

Profiling

Configure the build to include debug information for profiling:

CXXFLAGS="-fno-omit-frame-pointer" meson --reconfigure build -Dbenchmark=enabled --buildtype=debug
ninja -Cbuild

Then run the benchmark with perf:

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