Run benchmark suite. This command will run the benchmark suite for a single build. This is used to capture (and/or publish) the results. The caller can optionally specify a target which is either a git revision (commit, tag, special values like HEAD) or a cmake build directory.
(ctx, rev_or_path, src, preserve, preserve_dir, output,
cmake_extras, java_home, java_options, build_extras,
benchmark_extras, language, suite_filter, benchmark_filter,
repetitions, repetition_min_time, cpp_benchmark_extras,
**kwargs)
| 423 | "[default: use runner-specific defaults]")) |
| 424 | @click.pass_context |
| 425 | def benchmark_run(ctx, rev_or_path, src, preserve, preserve_dir, output, |
| 426 | cmake_extras, java_home, java_options, build_extras, |
| 427 | benchmark_extras, language, suite_filter, benchmark_filter, |
| 428 | repetitions, repetition_min_time, cpp_benchmark_extras, |
| 429 | **kwargs): |
| 430 | """ Run benchmark suite. |
| 431 | |
| 432 | This command will run the benchmark suite for a single build. This is |
| 433 | used to capture (and/or publish) the results. |
| 434 | |
| 435 | The caller can optionally specify a target which is either a git revision |
| 436 | (commit, tag, special values like HEAD) or a cmake build directory. |
| 437 | |
| 438 | When a commit is referenced, a local clone of the arrow sources (specified |
| 439 | via --src) is performed and the proper branch is created. This is done in |
| 440 | a temporary directory which can be left intact with the `--preserve` flag. |
| 441 | |
| 442 | The special token "WORKSPACE" is reserved to specify the current git |
| 443 | workspace. This imply that no clone will be performed. |
| 444 | |
| 445 | Examples: |
| 446 | |
| 447 | \b |
| 448 | # Run the benchmarks on current git workspace |
| 449 | \b |
| 450 | archery benchmark run |
| 451 | |
| 452 | \b |
| 453 | # Run the benchmarks on an existing build directory |
| 454 | \b |
| 455 | archery benchmark run /build/cpp |
| 456 | |
| 457 | \b |
| 458 | # Run the benchmarks on current previous commit |
| 459 | \b |
| 460 | archery benchmark run HEAD~1 |
| 461 | |
| 462 | \b |
| 463 | # Run the benchmarks on current git workspace and output results as a JSON file. |
| 464 | \b |
| 465 | archery benchmark run --output=run.json |
| 466 | """ |
| 467 | # A preserve_dir implies preserving the workspace. |
| 468 | preserve = preserve or preserve_dir is not None |
| 469 | with tmpdir(preserve=preserve, preserve_dir=preserve_dir) as root: |
| 470 | logger.debug(f"Running benchmark {rev_or_path}") |
| 471 | |
| 472 | if language == "cpp": |
| 473 | conf = CppBenchmarkRunner.default_configuration( |
| 474 | cmake_extras=cmake_extras, **kwargs) |
| 475 | |
| 476 | repetitions = repetitions if repetitions != -1 else 1 |
| 477 | runner_base = CppBenchmarkRunner.from_rev_or_path( |
| 478 | src, root, rev_or_path, conf, |
| 479 | repetitions=repetitions, repetition_min_time=repetition_min_time, |
| 480 | suite_filter=suite_filter, benchmark_filter=benchmark_filter, |
| 481 | benchmark_extras=cpp_benchmark_extras) |
| 482 |
nothing calls this directly
no test coverage detected