From 6d5897a660efd5b85852c03284f69846faee3c7d Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 23 Oct 2024 09:51:36 -0400 Subject: [PATCH] Document how to find the path of executables in the test suite --- libcxx/docs/TestingLibcxx.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst index e1299532ac9e6d..e6f6e15d29d52f 100644 --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -448,7 +448,16 @@ For more information about using the Google Benchmark library, see the The benchmarks are located under ``libcxx/test/benchmarks``. Running a benchmark works in the same way as running a test. Both the benchmarks and the tests share the same configuration, so make sure to enable the relevant optimization level -when running the benchmarks. +when running the benchmarks. For example, + +.. code-block:: bash + + $ libcxx/utils/libcxx-lit -sv libcxx/test/benchmarks/string.bench.cpp --param optimization=speed + +If you want to see where a benchmark is located (e.g. you want to store the executable +for subsequent analysis), you can print that information by passing ``--show-all`` to +``lit``. That will print the command-lines being executed, which includes the location +of the executable created for that benchmark. Note that benchmarks are only dry-run when run via the ``check-cxx`` target since we only want to make sure they don't rot. Do not rely on the results of benchmarks