Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench.cpp
// Copyright (c) 2015-2019 The Bitcoin Core developers | // Copyright (c) 2015-2019 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <bench/bench.h> | #include <bench/bench.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <test/util/setup_common.h> | #include <test/util/setup_common.h> | ||||
#include <regex> | #include <regex> | ||||
const std::function<void(const std::string &)> G_TEST_LOG_FUN{}; | |||||
namespace { | namespace { | ||||
void GenerateTemplateResults( | void GenerateTemplateResults( | ||||
const std::vector<ankerl::nanobench::Result> &benchmarkResults, | const std::vector<ankerl::nanobench::Result> &benchmarkResults, | ||||
const std::string &filename, const char *tpl) { | const std::string &filename, const char *tpl) { | ||||
if (benchmarkResults.empty() || filename.empty()) { | if (benchmarkResults.empty() || filename.empty()) { | ||||
// nothing to write, bail out | // nothing to write, bail out | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |