Skip to content

Commit 3303cf2

Browse files
committed
Document C++ benchmark recipes
1 parent bd2e83f commit 3303cf2

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tools/make/lib/benchmark/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,46 @@ This recipe is useful when wanting to run a list of C benchmark files generated
6868

6969
* * *
7070

71+
### C++
72+
73+
**Note**: C++ benchmark recipes delegate to local Makefiles which are responsible for actually compiling and running the respective benchmarks.
74+
75+
#### benchmark-cpp
76+
77+
Runs C++ benchmarks.
78+
79+
<!-- run-disable -->
80+
81+
```bash
82+
$ make benchmark-cpp
83+
```
84+
85+
The recipe recognizes the following environment variables:
86+
87+
- **BENCHMARKS_FILTER**: filepath pattern; e.g., `.*/blas/base/dasum/.*`.
88+
- **CXX_COMPILER**: C++ compiler; e.g., `g++`.
89+
90+
This recipe is useful when wanting to glob for C++ benchmark files (e.g., run all C++ benchmarks for a particular package).
91+
92+
#### benchmark-cpp-files
93+
94+
Runs a specified list of C++ benchmark files.
95+
96+
<!-- run-disable -->
97+
98+
```bash
99+
$ make benchmark-cpp-files FILES='/foo/benchmark.cpp /bar/benchmark.cpp'
100+
```
101+
102+
The recipe recognizes the following environment variables:
103+
104+
- **FILES**: list of C++ benchmark files.
105+
- **CXX_COMPILER**: C++ compiler; e.g., `g++`.
106+
107+
This recipe is useful when wanting to run a list of C++ benchmark files generated by some other command (e.g., a filtered list of changed C++ benchmark files obtained via `git diff`).
108+
109+
* * *
110+
71111
</section>
72112

73113
<!-- /.usage -->

0 commit comments

Comments
 (0)