bench: Allow skip benchmark

Co-authored-by: Martin Ankerl <Martin.Ankerl@gmail.com>
This commit is contained in:
Hennadii Stepanov 2020-08-14 14:56:18 +03:00
parent b4d0366b47
commit ce3e6a7cb2
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -70,7 +70,10 @@ void benchmark::BenchRunner::RunAll(const Args& args)
}
std::cout << bench.complexityBigO() << std::endl;
}
benchmarkResults.push_back(bench.results().back());
if (!bench.results().empty()) {
benchmarkResults.push_back(bench.results().back());
}
}
GenerateTemplateResults(benchmarkResults, args.output_csv, "# Benchmark, evals, iterations, total, min, max, median\n"