Skip to content

Commit

Permalink
Document how to find the path of executables in the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Oct 23, 2024
1 parent bef5d24 commit 6d5897a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion libcxx/docs/TestingLibcxx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <build> -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
Expand Down

0 comments on commit 6d5897a

Please sign in to comment.