From 40975fc3c233af72d5f5591d957d128793e1c2dc Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 20 Apr 2022 18:54:36 +0000 Subject: [PATCH] [perf] Add some instructions for building/running benchmarks. --- perf/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 perf/README.md diff --git a/perf/README.md b/perf/README.md new file mode 100644 index 000000000..4d42d560b --- /dev/null +++ b/perf/README.md @@ -0,0 +1,24 @@ +Benchmarks are implemented using [Google Benchmark](https://github.com/google/benchmark). + +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 +``` + +Then build the benchmark binaries with ninja: + +``` +ninja -Cbuild perf/benchmark-set +``` + +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](https://github.com/google/benchmark/blob/main/docs/user_guide.md#user-guide) for more details.