mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
bench: Suppress output when running with -sanity-check option
This change allows to simplify CI tests, and makes it easier to integrate the `bench_bitcoin` binary into CMake custom targets or commands, as `COMMAND` does not support output redirection
This commit is contained in:
parent
9dce30194b
commit
4dbcdf26a3
2 changed files with 3 additions and 2 deletions
|
|
@ -83,7 +83,7 @@ void BenchRunner::RunAll(const Args& args)
|
|||
std::smatch baseMatch;
|
||||
|
||||
if (args.sanity_check) {
|
||||
std::cout << "Running with --sanity-check option, benchmark results will be useless." << std::endl;
|
||||
std::cout << "Running with -sanity-check option, output is being suppressed as benchmark results will be useless." << std::endl;
|
||||
}
|
||||
|
||||
std::vector<ankerl::nanobench::Result> benchmarkResults;
|
||||
|
|
@ -106,6 +106,7 @@ void BenchRunner::RunAll(const Args& args)
|
|||
Bench bench;
|
||||
if (args.sanity_check) {
|
||||
bench.epochs(1).epochIterations(1);
|
||||
bench.output(nullptr);
|
||||
}
|
||||
bench.name(name);
|
||||
if (args.min_time > 0ms) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue