Skip to content

Commit 6d5897a

Browse files
committed
Document how to find the path of executables in the test suite
1 parent bef5d24 commit 6d5897a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

libcxx/docs/TestingLibcxx.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,16 @@ For more information about using the Google Benchmark library, see the
448448
The benchmarks are located under ``libcxx/test/benchmarks``. Running a benchmark
449449
works in the same way as running a test. Both the benchmarks and the tests share
450450
the same configuration, so make sure to enable the relevant optimization level
451-
when running the benchmarks.
451+
when running the benchmarks. For example,
452+
453+
.. code-block:: bash
454+
455+
$ libcxx/utils/libcxx-lit <build> -sv libcxx/test/benchmarks/string.bench.cpp --param optimization=speed
456+
457+
If you want to see where a benchmark is located (e.g. you want to store the executable
458+
for subsequent analysis), you can print that information by passing ``--show-all`` to
459+
``lit``. That will print the command-lines being executed, which includes the location
460+
of the executable created for that benchmark.
452461

453462
Note that benchmarks are only dry-run when run via the ``check-cxx`` target since
454463
we only want to make sure they don't rot. Do not rely on the results of benchmarks

0 commit comments

Comments
 (0)