1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
|
<!--
@license Apache-2.0
Copyright (c) 2018 The Stdlib Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Benchmark
> Benchmark commands.
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
<section class="intro">
This directory contains [`make`][make] rules for running language benchmarks.
</section>
<!-- /.intro -->
<!-- Usage documentation. -->
<section class="usage">
## Usage
```text
Usage: make <command> [<ENV_VAR>=<value> <ENV_VAR>=<value> ...]
```
### Commands
#### benchmark
Runs benchmarks.
<!-- run-disable -->
```bash
$ make benchmark
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
This command is an **alias** for `benchmark-javascript`, which is documented below.
#### benchmark-lang
Runs cross-language benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-lang
```
The command supports the environment variables supported by each language-specific (`benchmark-<lang>`) command documented below.
This command is useful when wanting to glob for benchmark files, irrespective of language, for a particular package in order to compare cross-language performance.
* * *
### C
> **Note**: C benchmark commands delegate to local Makefiles which are responsible for actually compiling and running the respective benchmarks.
#### benchmark-c
Runs C benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-c
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/math/base/special/abs/.*`.
- **BLAS**: BLAS library name; e.g., `openblas`.
- **BLAS_DIR**: BLAS directory.
- **C_COMPILER**: C compiler; e.g., `gcc`.
This command is useful when wanting to glob for C benchmark files (e.g., run all C benchmarks for a particular package).
#### benchmark-c-files
Runs a specified list of C benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-c-files FILES='/foo/benchmark.c /bar/benchmark.c'
```
The command supports the following environment variables:
- **FILES**: list of C benchmark files.
- **BLAS**: BLAS library name; e.g., `openblas`.
- **BLAS_DIR**: BLAS directory.
- **C_COMPILER**: C compiler; e.g., `gcc`.
This command 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`).
* * *
### C++
> **Note**: C++ benchmark commands delegate to local Makefiles which are responsible for actually compiling and running the respective benchmarks.
#### benchmark-cpp
Runs C++ benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-cpp
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/math/base/special/beta/.*`.
- **CXX_COMPILER**: C++ compiler; e.g., `g++`.
This command is useful when wanting to glob for C++ benchmark files (e.g., run all C++ benchmarks for a particular package).
#### benchmark-cpp-files
Runs a specified list of C++ benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-cpp-files FILES='/foo/benchmark.cpp /bar/benchmark.cpp'
```
The command supports the following environment variables:
- **FILES**: list of C++ benchmark files.
- **CXX_COMPILER**: C++ compiler; e.g., `g++`.
This command 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`).
* * *
### Fortran
> **Note**: Fortran benchmark commands delegate to local Makefiles which are responsible for actually compiling and running the respective benchmarks.
#### benchmark-fortran
Runs Fortran benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-fortran
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/blas/base/daxpy/.*`.
- **FORTRAN_COMPILER**: Fortran compiler; e.g., `gfortran`.
This command is useful when wanting to glob for Fortran benchmark files (e.g., run all Fortran benchmarks for a particular package).
#### benchmark-fortran-files
Runs a specified list of Fortran benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-fortran-files FILES='/foo/benchmark.f /bar/benchmark.f'
```
The command supports the following environment variables:
- **FILES**: list of Fortran benchmark files.
- **FORTRAN_COMPILER**: Fortran compiler; e.g., `gfortran`.
This command is useful when wanting to run a list of Fortran benchmark files generated by some other command (e.g., a filtered list of changed Fortran benchmark files obtained via `git diff`).
* * *
### JavaScript
#### benchmark-javascript
Runs JavaScript benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-javascript
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/utils/group-by/.*`.
This command is useful when wanting to glob for JavaScript benchmark files (e.g., run all JavaScript benchmarks for a particular package).
#### benchmark-javascript-files
Runs a specified list of JavaScript benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-javascript-files FILES='/foo/benchmark.js /bar/benchmark.js'
```
The command supports the following environment variables:
- **FILES**: list of JavaScript benchmark files.
This command is useful when wanting to run a list of JavaScript benchmark files generated by some other command (e.g., a filtered list of changed JavaScript benchmark files obtained via `git diff`).
* * *
### Julia
#### benchmark-julia
Runs Julia benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-julia
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/math/base/special/erf/.*`.
This command is useful when wanting to glob for Julia benchmark files (e.g., run all Julia benchmarks for a particular package).
#### benchmark-julia-files
Runs a specified list of Julia benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-julia-files FILES='/foo/benchmark.jl /bar/benchmark.jl'
```
The command supports the following environment variables:
- **FILES**: list of Julia benchmark files.
This command is useful when wanting to run a list of Julia benchmark files generated by some other command (e.g., a filtered list of changed Julia benchmark files obtained via `git diff`).
* * *
### Python
#### benchmark-python
Runs Python benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-python
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/math/base/special/digamma/.*`.
This command is useful when wanting to glob for Python benchmark files (e.g., run all Python benchmarks for a particular package).
#### benchmark-python-files
Runs a specified list of Python benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-python-files FILES='/foo/benchmark.py /bar/benchmark.py'
```
The command supports the following environment variables:
- **FILES**: list of Python benchmark files.
This command is useful when wanting to run a list of Python benchmark files generated by some other command (e.g., a filtered list of changed Python benchmark files obtained via `git diff`).
* * *
### R
#### benchmark-r
Runs R benchmarks.
<!-- run-disable -->
```bash
$ make benchmark-r
```
The command supports the following environment variables:
- **BENCHMARKS_FILTER**: file path pattern; e.g., `.*/math/base/special/expm1/.*`.
This command is useful when wanting to glob for R benchmark files (e.g., run all R benchmarks for a particular package).
#### benchmark-r-files
Runs a specified list of R benchmark files.
<!-- run-disable -->
```bash
$ make benchmark-r-files FILES='/foo/benchmark.R /bar/benchmark.R'
```
The command supports the following environment variables:
- **FILES**: list of R benchmark files.
This command is useful when wanting to run a list of R benchmark files generated by some other command (e.g., a filtered list of changed R benchmark files obtained via `git diff`).
</section>
<!-- /.usage -->
<!-- Section to include notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="notes">
</section>
<!-- /.notes -->
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="links">
[make]: https://www.gnu.org/software/make/
</section>
<!-- /.links -->
|