Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench_bitcoin.cpp
// Copyright (c) 2015-2016 The Bitcoin Core developers | // Copyright (c) 2015-2016 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 <crypto/sha256.h> | #include <crypto/sha256.h> | ||||
#include <key.h> | #include <key.h> | ||||
#include <random.h> | |||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <memory> | #include <memory> | ||||
const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr; | const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr; | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | int main(int argc, char **argv) { | ||||
} | } | ||||
if (HelpRequested(gArgs)) { | if (HelpRequested(gArgs)) { | ||||
std::cout << gArgs.GetHelpMessage(); | std::cout << gArgs.GetHelpMessage(); | ||||
return EXIT_SUCCESS; | return EXIT_SUCCESS; | ||||
} | } | ||||
SHA256AutoDetect(); | SHA256AutoDetect(); | ||||
RandomInit(); | |||||
ECC_Start(); | ECC_Start(); | ||||
SetupEnvironment(); | SetupEnvironment(); | ||||
// don't want to write to debug.log file | // don't want to write to debug.log file | ||||
GetLogger().m_print_to_file = false; | GetLogger().m_print_to_file = false; | ||||
int64_t evaluations = gArgs.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS); | int64_t evaluations = gArgs.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS); | ||||
std::string regex_filter = gArgs.GetArg("-filter", DEFAULT_BENCH_FILTER); | std::string regex_filter = gArgs.GetArg("-filter", DEFAULT_BENCH_FILTER); | ||||
Show All 27 Lines |