diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 17:16:04 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 17:16:04 +0900 |
commit | 0aa930a41f2d1ebf1fa90ec42da8f96d15a4dcbb (patch) | |
tree | 6a77b463f700e090df586672c26b9fe765fd115b /libcxx/docs/TestingLibcxx.rst | |
parent | ec6892d1c979ce0b84c86918d5cdbb03037b409a (diff) | |
parent | 6d16b1c5c468a79ecf867293023c89ac518ecdda (diff) | |
download | llvm-users/chapuni/cov/single/nextcount-base.zip llvm-users/chapuni/cov/single/nextcount-base.tar.gz llvm-users/chapuni/cov/single/nextcount-base.tar.bz2 |
Merge branch 'users/chapuni/cov/single/pair' into users/chapuni/cov/single/nextcount-baseusers/chapuni/cov/single/nextcount-base
Diffstat (limited to 'libcxx/docs/TestingLibcxx.rst')
-rw-r--r-- | libcxx/docs/TestingLibcxx.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst index cf092fa..e98b96b 100644 --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -459,6 +459,29 @@ we only want to make sure they don't rot. Do not rely on the results of benchmar run through ``check-cxx`` for anything, instead run the benchmarks manually using the instructions for running individual tests. +If you want to compare the results of different benchmark runs, we recommend using the +``libcxx-compare-benchmarks`` helper tool. First, configure CMake in a build directory +and run the benchmark: + +.. code-block:: bash + + $ cmake -S runtimes -B <build1> [...] + $ libcxx/utils/libcxx-lit <build1> libcxx/test/benchmarks/string.bench.cpp --param optimization=speed + +Then, do the same for the second configuration you want to test. Use a different build +directory for that configuration: + +.. code-block:: bash + + $ cmake -S runtimes -B <build2> [...] + $ libcxx/utils/libcxx-lit <build2> libcxx/test/benchmarks/string.bench.cpp --param optimization=speed + +Finally, use ``libcxx-compare-benchmarks`` to compare both: + +.. code-block:: bash + + $ libcxx/utils/libcxx-compare-benchmarks <build1> <build2> libcxx/test/benchmarks/string.bench.cpp + .. _`Google Benchmark`: https://github.com/google/benchmark .. _testing-hardening-assertions: |