Merge bitcoin/bitcoin#34210: bench: Remove -priority-level= option

fa3df52712 bench: Require semicolon after BENCHMARK(foo) (MarcoFalke)
fa8938f08c bench: Remove incorrect __LINE__ in BENCHMARK macro (MarcoFalke)
fa51a28a94 scripted-diff: Remove priority_level from BENCHMARK macro (MarcoFalke)
fa790c3eea bench: Remove -priority-level= option (MarcoFalke)

Pull request description:

  The option was added in https://github.com/bitcoin/bitcoin/pull/26158, when the project was using an autotools-based build system. However, in the meantime this option is unused:

  * First, commit 27f11217ca removed the option from one CI task
  * Then https://github.com/bitcoin/bitcoin/pull/32310 removed the option from CMakeList.txt, because:

    * they only run as a sanity check (fastest version)
    * no one otherwise runs them, not even CI
    * issues have been missed due to this

  Finally, after commit 0ad4376a49, I don't see a single reason to keep this option, so remove it.

  Also, there is a commit to turn a silent ignore of duplicate bench names into an error.

ACKs for top commit:
  achow101:
    ACK fa3df52712
  l0rinc:
    ACK fa3df52712
  hebasto:
    re-ACK fa3df52712, only suggested changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/34210#pullrequestreview-3652414135).

Tree-SHA512: 68a314bff551fa878196d5a615d41d71e1c8c504135e6fc555659aa9f0c8786957d49ba038448e933554a8bc54caea2ddd7d628042c5627bf3bf37628210f8fb
This commit is contained in:
Ava Chow
2026-01-14 14:49:06 -08:00
57 changed files with 175 additions and 235 deletions

View File

@@ -175,9 +175,9 @@ static void AddrManAddThenGood(benchmark::Bench& bench)
});
}
BENCHMARK(AddrManAdd, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManSelect, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManSelectFromAlmostEmpty, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManSelectByNetwork, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManGetAddr, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManAddThenGood, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManAdd);
BENCHMARK(AddrManSelect);
BENCHMARK(AddrManSelectFromAlmostEmpty);
BENCHMARK(AddrManSelectByNetwork);
BENCHMARK(AddrManGetAddr);
BENCHMARK(AddrManAddThenGood);

View File

@@ -51,6 +51,6 @@ static void Base58Decode(benchmark::Bench& bench)
}
BENCHMARK(Base58Encode, benchmark::PriorityLevel::HIGH);
BENCHMARK(Base58CheckEncode, benchmark::PriorityLevel::HIGH);
BENCHMARK(Base58Decode, benchmark::PriorityLevel::HIGH);
BENCHMARK(Base58Encode);
BENCHMARK(Base58CheckEncode);
BENCHMARK(Base58Decode);

View File

@@ -31,5 +31,5 @@ static void Bech32Decode(benchmark::Bench& bench)
}
BENCHMARK(Bech32Encode, benchmark::PriorityLevel::HIGH);
BENCHMARK(Bech32Decode, benchmark::PriorityLevel::HIGH);
BENCHMARK(Bech32Encode);
BENCHMARK(Bech32Decode);

View File

@@ -5,25 +5,20 @@
#include <bench/bench.h>
#include <test/util/setup_common.h> // IWYU pragma: keep
#include <tinyformat.h>
#include <util/check.h>
#include <util/fs.h>
#include <util/string.h>
#include <chrono>
#include <compare>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <ratio>
#include <regex>
#include <set>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
using namespace std::chrono_literals;
using util::Join;
const std::function<void(const std::string&)> G_TEST_LOG_FUN{};
@@ -69,37 +64,15 @@ void GenerateTemplateResults(const std::vector<ankerl::nanobench::Result>& bench
namespace benchmark {
// map a label to one or multiple priority levels
std::map<std::string, uint8_t> map_label_priority = {
{"high", PriorityLevel::HIGH},
{"low", PriorityLevel::LOW},
{"all", 0xff}
};
std::string ListPriorities()
{
using item_t = std::pair<std::string, uint8_t>;
auto sort_by_priority = [](item_t a, item_t b){ return a.second < b.second; };
std::set<item_t, decltype(sort_by_priority)> sorted_priorities(map_label_priority.begin(), map_label_priority.end(), sort_by_priority);
return Join(sorted_priorities, ',', [](const auto& entry){ return entry.first; });
}
uint8_t StringToPriority(const std::string& str)
{
auto it = map_label_priority.find(str);
if (it == map_label_priority.end()) throw std::runtime_error(strprintf("Unknown priority level %s", str));
return it->second;
}
BenchRunner::BenchmarkMap& BenchRunner::benchmarks()
{
static BenchmarkMap benchmarks_map;
return benchmarks_map;
}
BenchRunner::BenchRunner(std::string name, BenchFunction func, PriorityLevel level)
BenchRunner::BenchRunner(std::string name, BenchFunction func)
{
benchmarks().insert(std::make_pair(name, std::make_pair(func, level)));
Assert(benchmarks().try_emplace(std::move(name), std::move(func)).second);
}
void BenchRunner::RunAll(const Args& args)
@@ -120,12 +93,7 @@ void BenchRunner::RunAll(const Args& args)
};
std::vector<ankerl::nanobench::Result> benchmarkResults;
for (const auto& [name, bench_func] : benchmarks()) {
const auto& [func, priority_level] = bench_func;
if (!(priority_level & args.priority)) {
continue;
}
for (const auto& [name, func] : benchmarks()) {
if (!std::regex_match(name, baseMatch, reFilter)) {
continue;

View File

@@ -10,11 +10,9 @@
#include <util/macros.h>
#include <chrono>
#include <cstdint>
#include <functional>
#include <map>
#include <string>
#include <utility>
#include <vector>
/*
@@ -40,17 +38,7 @@ namespace benchmark {
using ankerl::nanobench::Bench;
typedef std::function<void(Bench&)> BenchFunction;
enum PriorityLevel : uint8_t
{
LOW = 1 << 0,
HIGH = 1 << 2,
};
// List priority labels, comma-separated and sorted by increasing priority
std::string ListPriorities();
uint8_t StringToPriority(const std::string& str);
using BenchFunction = std::function<void(Bench&)>;
struct Args {
bool is_list_only;
@@ -60,25 +48,24 @@ struct Args {
fs::path output_csv;
fs::path output_json;
std::string regex_filter;
uint8_t priority;
std::vector<std::string> setup_args;
};
class BenchRunner
{
// maps from "name" -> (function, priority_level)
typedef std::map<std::string, std::pair<BenchFunction, PriorityLevel>> BenchmarkMap;
// maps from "name" -> function
using BenchmarkMap = std::map<std::string, BenchFunction>;
static BenchmarkMap& benchmarks();
public:
BenchRunner(std::string name, BenchFunction func, PriorityLevel level);
BenchRunner(std::string name, BenchFunction func);
static void RunAll(const Args& args);
};
} // namespace benchmark
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo", foo, priority_level);
#define BENCHMARK(n, priority_level) \
benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n, priority_level);
// BENCHMARK(foo); expands to: benchmark::BenchRunner bench_runner_foo{"foo", foo};
#define BENCHMARK(n) \
benchmark::BenchRunner PASTE2(bench_runner_, n) { STRINGIZE(n), n }
#endif // BITCOIN_BENCH_BENCH_H

View File

@@ -18,12 +18,8 @@
#include <sstream>
#include <vector>
using util::SplitString;
static const char* DEFAULT_BENCH_FILTER = ".*";
static constexpr int64_t DEFAULT_MIN_TIME_MS{10};
/** Priority level default value, run "all" priority levels */
static const std::string DEFAULT_PRIORITY{"all"};
static void SetupBenchArgs(ArgsManager& argsman)
{
@@ -37,8 +33,6 @@ static void SetupBenchArgs(ArgsManager& argsman)
argsman.AddArg("-output-csv=<output.csv>", "Generate CSV file with the most important benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-output-json=<output.json>", "Generate JSON file with all benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-sanity-check", "Run benchmarks for only one iteration with no output", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-priority-level=<l1,l2,l3>", strprintf("Run benchmarks of one or multiple priority level(s) (%s), default: '%s'",
benchmark::ListPriorities(), DEFAULT_PRIORITY), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
}
// parses a comma separated list like "10,20,30,50"
@@ -54,14 +48,6 @@ static std::vector<double> parseAsymptote(const std::string& str) {
return numbers;
}
static uint8_t parsePriorityLevel(const std::string& str) {
uint8_t levels{0};
for (const auto& level: SplitString(str, ',')) {
levels |= benchmark::StringToPriority(level);
}
return levels;
}
static std::vector<std::string> parseTestSetupArgs(const ArgsManager& argsman)
{
// Parses unit test framework arguments supported by the benchmark framework.
@@ -144,7 +130,6 @@ int main(int argc, char** argv)
args.output_json = argsman.GetPathArg("-output-json");
args.regex_filter = argsman.GetArg("-filter", DEFAULT_BENCH_FILTER);
args.sanity_check = argsman.GetBoolArg("-sanity-check", false);
args.priority = parsePriorityLevel(argsman.GetArg("-priority-level", DEFAULT_PRIORITY));
args.setup_args = parseTestSetupArgs(argsman);
benchmark::BenchRunner::RunAll(args);

View File

@@ -46,4 +46,4 @@ static void BIP324_ECDH(benchmark::Bench& bench)
});
}
BENCHMARK(BIP324_ECDH, benchmark::PriorityLevel::HIGH);
BENCHMARK(BIP324_ECDH);

View File

@@ -69,5 +69,5 @@ static void BlockAssemblerAddPackageTxns(benchmark::Bench& bench)
});
}
BENCHMARK(AssembleBlock, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockAssemblerAddPackageTxns, benchmark::PriorityLevel::LOW);
BENCHMARK(AssembleBlock);
BENCHMARK(BlockAssemblerAddPackageTxns);

View File

@@ -126,6 +126,6 @@ static void BlockEncodingLargeExtra(benchmark::Bench& bench)
BlockEncodingBench(bench, 50000, 5000);
}
BENCHMARK(BlockEncodingNoExtra, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockEncodingStdExtra, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockEncodingLargeExtra, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockEncodingNoExtra);
BENCHMARK(BlockEncodingStdExtra);
BENCHMARK(BlockEncodingLargeExtra);

View File

@@ -54,4 +54,4 @@ static void CCoinsCaching(benchmark::Bench& bench)
});
}
BENCHMARK(CCoinsCaching, benchmark::PriorityLevel::HIGH);
BENCHMARK(CCoinsCaching);

View File

@@ -71,9 +71,9 @@ static void FSCHACHA20POLY1305_1MB(benchmark::Bench& bench)
FSCHACHA20POLY1305(bench, BUFFER_SIZE_LARGE);
}
BENCHMARK(CHACHA20_64BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_256BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_1MB, benchmark::PriorityLevel::HIGH);
BENCHMARK(FSCHACHA20POLY1305_64BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(FSCHACHA20POLY1305_256BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(FSCHACHA20POLY1305_1MB, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_64BYTES);
BENCHMARK(CHACHA20_256BYTES);
BENCHMARK(CHACHA20_1MB);
BENCHMARK(FSCHACHA20POLY1305_64BYTES);
BENCHMARK(FSCHACHA20POLY1305_256BYTES);
BENCHMARK(FSCHACHA20POLY1305_1MB);

View File

@@ -60,5 +60,5 @@ static void DeserializeAndCheckBlockTest(benchmark::Bench& bench)
});
}
BENCHMARK(DeserializeBlockTest, benchmark::PriorityLevel::HIGH);
BENCHMARK(DeserializeAndCheckBlockTest, benchmark::PriorityLevel::HIGH);
BENCHMARK(DeserializeBlockTest);
BENCHMARK(DeserializeAndCheckBlockTest);

View File

@@ -19,4 +19,4 @@ static void CheckBlockIndex(benchmark::Bench& bench)
}
BENCHMARK(CheckBlockIndex, benchmark::PriorityLevel::HIGH);
BENCHMARK(CheckBlockIndex);

View File

@@ -65,4 +65,4 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
control.Complete();
});
}
BENCHMARK(CCheckQueueSpeedPrevectorJob, benchmark::PriorityLevel::HIGH);
BENCHMARK(CCheckQueueSpeedPrevectorJob);

View File

@@ -150,12 +150,12 @@ static void LinearizeOptimallyPerCost(benchmark::Bench& bench)
BenchLinearizeOptimallyPerCost(bench, "LinearizeOptimallySyntheticPerCost", CLUSTERS_SYNTHETIC);
}
BENCHMARK(PostLinearize16TxWorstCase, benchmark::PriorityLevel::HIGH);
BENCHMARK(PostLinearize32TxWorstCase, benchmark::PriorityLevel::HIGH);
BENCHMARK(PostLinearize48TxWorstCase, benchmark::PriorityLevel::HIGH);
BENCHMARK(PostLinearize64TxWorstCase, benchmark::PriorityLevel::HIGH);
BENCHMARK(PostLinearize75TxWorstCase, benchmark::PriorityLevel::HIGH);
BENCHMARK(PostLinearize99TxWorstCase, benchmark::PriorityLevel::HIGH);
BENCHMARK(PostLinearize16TxWorstCase);
BENCHMARK(PostLinearize32TxWorstCase);
BENCHMARK(PostLinearize48TxWorstCase);
BENCHMARK(PostLinearize64TxWorstCase);
BENCHMARK(PostLinearize75TxWorstCase);
BENCHMARK(PostLinearize99TxWorstCase);
BENCHMARK(LinearizeOptimallyTotal, benchmark::PriorityLevel::HIGH);
BENCHMARK(LinearizeOptimallyPerCost, benchmark::PriorityLevel::HIGH);
BENCHMARK(LinearizeOptimallyTotal);
BENCHMARK(LinearizeOptimallyPerCost);

View File

@@ -137,5 +137,5 @@ static void BnBExhaustion(benchmark::Bench& bench)
});
}
BENCHMARK(CoinSelection, benchmark::PriorityLevel::HIGH);
BENCHMARK(BnBExhaustion, benchmark::PriorityLevel::HIGH);
BENCHMARK(CoinSelection);
BENCHMARK(BnBExhaustion);

View File

@@ -126,6 +126,6 @@ static void ConnectBlockAllEcdsa(benchmark::Bench& bench)
BenchmarkConnectBlock(bench, keys, outputs, *test_setup);
}
BENCHMARK(ConnectBlockAllSchnorr, benchmark::PriorityLevel::HIGH);
BENCHMARK(ConnectBlockMixedEcdsaSchnorr, benchmark::PriorityLevel::HIGH);
BENCHMARK(ConnectBlockAllEcdsa, benchmark::PriorityLevel::HIGH);
BENCHMARK(ConnectBlockAllSchnorr);
BENCHMARK(ConnectBlockMixedEcdsaSchnorr);
BENCHMARK(ConnectBlockAllEcdsa);

View File

@@ -260,27 +260,27 @@ static void MuHashFinalize(benchmark::Bench& bench)
});
}
BENCHMARK(BenchRIPEMD160, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA1, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_STANDARD, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_SSE4, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_AVX2, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_SHANI, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA512, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA3_256_1M, benchmark::PriorityLevel::HIGH);
BENCHMARK(BenchRIPEMD160);
BENCHMARK(SHA1);
BENCHMARK(SHA256_STANDARD);
BENCHMARK(SHA256_SSE4);
BENCHMARK(SHA256_AVX2);
BENCHMARK(SHA256_SHANI);
BENCHMARK(SHA512);
BENCHMARK(SHA3_256_1M);
BENCHMARK(SHA256_32b_STANDARD, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_32b_SSE4, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_32b_AVX2, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_32b_SHANI, benchmark::PriorityLevel::HIGH);
BENCHMARK(SipHash_32b, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256D64_1024_STANDARD, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256D64_1024_SSE4, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256D64_1024_AVX2, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256D64_1024_SHANI, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_32b_STANDARD);
BENCHMARK(SHA256_32b_SSE4);
BENCHMARK(SHA256_32b_AVX2);
BENCHMARK(SHA256_32b_SHANI);
BENCHMARK(SipHash_32b);
BENCHMARK(SHA256D64_1024_STANDARD);
BENCHMARK(SHA256D64_1024_SSE4);
BENCHMARK(SHA256D64_1024_AVX2);
BENCHMARK(SHA256D64_1024_SHANI);
BENCHMARK(MuHash, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashMul, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashDiv, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashPrecompute, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashFinalize, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHash);
BENCHMARK(MuHashMul);
BENCHMARK(MuHashDiv);
BENCHMARK(MuHashPrecompute);
BENCHMARK(MuHashFinalize);

View File

@@ -35,4 +35,4 @@ static void ExpandDescriptor(benchmark::Bench& bench)
});
}
BENCHMARK(ExpandDescriptor, benchmark::PriorityLevel::HIGH);
BENCHMARK(ExpandDescriptor);

View File

@@ -134,6 +134,6 @@ static void AddAndRemoveDisconnectedBlockTransactions10(benchmark::Bench& bench)
});
}
BENCHMARK(AddAndRemoveDisconnectedBlockTransactionsAll, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddAndRemoveDisconnectedBlockTransactions90, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddAndRemoveDisconnectedBlockTransactions10, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddAndRemoveDisconnectedBlockTransactionsAll);
BENCHMARK(AddAndRemoveDisconnectedBlockTransactions90);
BENCHMARK(AddAndRemoveDisconnectedBlockTransactions10);

View File

@@ -76,4 +76,4 @@ static void DuplicateInputs(benchmark::Bench& bench)
});
}
BENCHMARK(DuplicateInputs, benchmark::PriorityLevel::HIGH);
BENCHMARK(DuplicateInputs);

View File

@@ -29,4 +29,4 @@ static void EllSwiftCreate(benchmark::Bench& bench)
});
}
BENCHMARK(EllSwiftCreate, benchmark::PriorityLevel::HIGH);
BENCHMARK(EllSwiftCreate);

View File

@@ -18,4 +18,4 @@ static void Trig(benchmark::Bench& bench)
});
}
BENCHMARK(Trig, benchmark::PriorityLevel::HIGH);
BENCHMARK(Trig);

View File

@@ -86,8 +86,8 @@ static void GCSFilterMatch(benchmark::Bench& bench)
filter.Match(GCSFilter::Element());
});
}
BENCHMARK(GCSBlockFilterGetHash, benchmark::PriorityLevel::HIGH);
BENCHMARK(GCSFilterConstruct, benchmark::PriorityLevel::HIGH);
BENCHMARK(GCSFilterDecode, benchmark::PriorityLevel::HIGH);
BENCHMARK(GCSFilterDecodeSkipCheck, benchmark::PriorityLevel::HIGH);
BENCHMARK(GCSFilterMatch, benchmark::PriorityLevel::HIGH);
BENCHMARK(GCSBlockFilterGetHash);
BENCHMARK(GCSFilterConstruct);
BENCHMARK(GCSFilterDecode);
BENCHMARK(GCSFilterDecodeSkipCheck);
BENCHMARK(GCSFilterMatch);

View File

@@ -26,7 +26,7 @@ static void PrePadded(benchmark::Bench& bench)
});
}
BENCHMARK(PrePadded, benchmark::PriorityLevel::HIGH);
BENCHMARK(PrePadded);
static void RegularPadded(benchmark::Bench& bench)
{
@@ -44,4 +44,4 @@ static void RegularPadded(benchmark::Bench& bench)
});
}
BENCHMARK(RegularPadded, benchmark::PriorityLevel::HIGH);
BENCHMARK(RegularPadded);

View File

@@ -56,4 +56,4 @@ static void BlockFilterIndexSync(benchmark::Bench& bench)
});
}
BENCHMARK(BlockFilterIndexSync, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockFilterIndexSync);

View File

@@ -71,4 +71,4 @@ static void LoadExternalBlockFile(benchmark::Bench& bench)
fs::remove(blkfile);
}
BENCHMARK(LoadExternalBlockFile, benchmark::PriorityLevel::HIGH);
BENCHMARK(LoadExternalBlockFile);

View File

@@ -38,4 +38,4 @@ static void BenchLockedPool(benchmark::Bench& bench)
addr.clear();
}
BENCHMARK(BenchLockedPool, benchmark::PriorityLevel::HIGH);
BENCHMARK(BenchLockedPool);

View File

@@ -57,8 +57,8 @@ static void LogWithoutWriteToFile(benchmark::Bench& bench)
});
}
BENCHMARK(LogWithDebug, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithoutDebug, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithoutThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithoutWriteToFile, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithDebug);
BENCHMARK(LogWithoutDebug);
BENCHMARK(LogWithThreadNames);
BENCHMARK(LogWithoutThreadNames);
BENCHMARK(LogWithoutWriteToFile);

View File

@@ -84,4 +84,4 @@ static void MempoolCheckEphemeralSpends(benchmark::Bench& bench)
});
}
BENCHMARK(MempoolCheckEphemeralSpends, benchmark::PriorityLevel::HIGH);
BENCHMARK(MempoolCheckEphemeralSpends);

View File

@@ -144,4 +144,4 @@ static void MempoolEviction(benchmark::Bench& bench)
});
}
BENCHMARK(MempoolEviction, benchmark::PriorityLevel::HIGH);
BENCHMARK(MempoolEviction);

View File

@@ -208,7 +208,7 @@ static void MempoolCheck(benchmark::Bench& bench)
});
}
BENCHMARK(MemPoolAncestorsDescendants, benchmark::PriorityLevel::HIGH);
BENCHMARK(MemPoolAddTransactions, benchmark::PriorityLevel::HIGH);
BENCHMARK(ComplexMemPool, benchmark::PriorityLevel::HIGH);
BENCHMARK(MempoolCheck, benchmark::PriorityLevel::HIGH);
BENCHMARK(MemPoolAncestorsDescendants);
BENCHMARK(MemPoolAddTransactions);
BENCHMARK(ComplexMemPool);
BENCHMARK(MempoolCheck);

View File

@@ -24,4 +24,4 @@ static void MerkleRoot(benchmark::Bench& bench)
});
}
BENCHMARK(MerkleRoot, benchmark::PriorityLevel::HIGH);
BENCHMARK(MerkleRoot);

View File

@@ -22,4 +22,4 @@ static void ObfuscationBench(benchmark::Bench& bench)
});
}
BENCHMARK(ObfuscationBench, benchmark::PriorityLevel::HIGH);
BENCHMARK(ObfuscationBench);

View File

@@ -34,4 +34,4 @@ static void HexParse(benchmark::Bench& bench)
});
}
BENCHMARK(HexParse, benchmark::PriorityLevel::HIGH);
BENCHMARK(HexParse);

View File

@@ -140,15 +140,15 @@ static void EvictionProtection3Networks250Candidates(benchmark::Bench& bench)
// - 250 candidates is the number of peers reported by operators of busy nodes
// No disadvantaged networks, with 250 eviction candidates.
BENCHMARK(EvictionProtection0Networks250Candidates, benchmark::PriorityLevel::HIGH);
BENCHMARK(EvictionProtection0Networks250Candidates);
// 1 disadvantaged network (Tor) with 250 eviction candidates.
BENCHMARK(EvictionProtection1Networks250Candidates, benchmark::PriorityLevel::HIGH);
BENCHMARK(EvictionProtection1Networks250Candidates);
// 2 disadvantaged networks (I2P, Tor) with 250 eviction candidates.
BENCHMARK(EvictionProtection2Networks250Candidates, benchmark::PriorityLevel::HIGH);
BENCHMARK(EvictionProtection2Networks250Candidates);
// 3 disadvantaged networks (I2P/localhost/Tor) with 50/100/250 eviction candidates.
BENCHMARK(EvictionProtection3Networks050Candidates, benchmark::PriorityLevel::HIGH);
BENCHMARK(EvictionProtection3Networks100Candidates, benchmark::PriorityLevel::HIGH);
BENCHMARK(EvictionProtection3Networks250Candidates, benchmark::PriorityLevel::HIGH);
BENCHMARK(EvictionProtection3Networks050Candidates);
BENCHMARK(EvictionProtection3Networks100Candidates);
BENCHMARK(EvictionProtection3Networks250Candidates);

View File

@@ -41,6 +41,6 @@ static void POLY1305_1MB(benchmark::Bench& bench)
POLY1305(bench, BUFFER_SIZE_LARGE);
}
BENCHMARK(POLY1305_64BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(POLY1305_256BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(POLY1305_1MB, benchmark::PriorityLevel::HIGH);
BENCHMARK(POLY1305_64BYTES);
BENCHMARK(POLY1305_256BYTES);
BENCHMARK(POLY1305_1MB);

View File

@@ -49,5 +49,5 @@ static void PoolAllocator_StdUnorderedMapWithPoolResource(benchmark::Bench& benc
BenchFillClearMap(bench, map);
}
BENCHMARK(PoolAllocator_StdUnorderedMap, benchmark::PriorityLevel::HIGH);
BENCHMARK(PoolAllocator_StdUnorderedMapWithPoolResource, benchmark::PriorityLevel::HIGH);
BENCHMARK(PoolAllocator_StdUnorderedMap);
BENCHMARK(PoolAllocator_StdUnorderedMapWithPoolResource);

View File

@@ -116,12 +116,12 @@ static void PrevectorFillVectorIndirect(benchmark::Bench& bench)
{ \
Prevector##name<nontrivial_t>(bench); \
} \
BENCHMARK(Prevector##name##Nontrivial, benchmark::PriorityLevel::HIGH); \
BENCHMARK(Prevector##name##Nontrivial); \
static void Prevector##name##Trivial(benchmark::Bench& bench) \
{ \
Prevector##name<trivial_t>(bench); \
} \
BENCHMARK(Prevector##name##Trivial, benchmark::PriorityLevel::HIGH);
BENCHMARK(Prevector##name##Trivial);
PREVECTOR_TEST(Clear)
PREVECTOR_TEST(Destructor)

View File

@@ -86,20 +86,20 @@ void InsecureRandom_stdshuffle100(benchmark::Bench& bench) { BenchRandom_stdshuf
} // namespace
BENCHMARK(FastRandom_rand64, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_rand32, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_randbool, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_randbits, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_randrange100, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_randrange1000, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_randrange1000000, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_stdshuffle100, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_rand64);
BENCHMARK(FastRandom_rand32);
BENCHMARK(FastRandom_randbool);
BENCHMARK(FastRandom_randbits);
BENCHMARK(FastRandom_randrange100);
BENCHMARK(FastRandom_randrange1000);
BENCHMARK(FastRandom_randrange1000000);
BENCHMARK(FastRandom_stdshuffle100);
BENCHMARK(InsecureRandom_rand64, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_rand32, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_randbool, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_randbits, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_randrange100, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_randrange1000, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_randrange1000000, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_stdshuffle100, benchmark::PriorityLevel::HIGH);
BENCHMARK(InsecureRandom_rand64);
BENCHMARK(InsecureRandom_rand32);
BENCHMARK(InsecureRandom_randbool);
BENCHMARK(InsecureRandom_randbits);
BENCHMARK(InsecureRandom_randrange100);
BENCHMARK(InsecureRandom_randrange1000);
BENCHMARK(InsecureRandom_randrange1000000);
BENCHMARK(InsecureRandom_stdshuffle100);

View File

@@ -63,6 +63,6 @@ static void ReadRawBlockBench(benchmark::Bench& bench)
});
}
BENCHMARK(WriteBlockBench, benchmark::PriorityLevel::HIGH);
BENCHMARK(ReadBlockBench, benchmark::PriorityLevel::HIGH);
BENCHMARK(ReadRawBlockBench, benchmark::PriorityLevel::HIGH);
BENCHMARK(WriteBlockBench);
BENCHMARK(ReadBlockBench);
BENCHMARK(ReadRawBlockBench);

View File

@@ -34,5 +34,5 @@ static void RollingBloomReset(benchmark::Bench& bench)
});
}
BENCHMARK(RollingBloom, benchmark::PriorityLevel::HIGH);
BENCHMARK(RollingBloomReset, benchmark::PriorityLevel::HIGH);
BENCHMARK(RollingBloom);
BENCHMARK(RollingBloomReset);

View File

@@ -70,9 +70,9 @@ static void BlockToJsonVerbosity3(benchmark::Bench& bench)
BlockToJson(bench, TxVerbosity::SHOW_DETAILS_AND_PREVOUT);
}
BENCHMARK(BlockToJsonVerbosity1, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockToJsonVerbosity2, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockToJsonVerbosity3, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockToJsonVerbosity1);
BENCHMARK(BlockToJsonVerbosity2);
BENCHMARK(BlockToJsonVerbosity3);
static void BlockToJsonVerboseWrite(benchmark::Bench& bench)
{
@@ -85,4 +85,4 @@ static void BlockToJsonVerboseWrite(benchmark::Bench& bench)
});
}
BENCHMARK(BlockToJsonVerboseWrite, benchmark::PriorityLevel::HIGH);
BENCHMARK(BlockToJsonVerboseWrite);

View File

@@ -48,4 +48,4 @@ static void RpcMempool(benchmark::Bench& bench)
});
}
BENCHMARK(RpcMempool, benchmark::PriorityLevel::HIGH);
BENCHMARK(RpcMempool);

View File

@@ -100,7 +100,7 @@ static void SignSchnorrWithNullMerkleRoot(benchmark::Bench& bench)
SignSchnorrTapTweakBenchmark(bench, /*use_null_merkle_root=*/true);
}
BENCHMARK(SignTransactionECDSA, benchmark::PriorityLevel::HIGH);
BENCHMARK(SignTransactionSchnorr, benchmark::PriorityLevel::HIGH);
BENCHMARK(SignSchnorrWithMerkleRoot, benchmark::PriorityLevel::HIGH);
BENCHMARK(SignSchnorrWithNullMerkleRoot, benchmark::PriorityLevel::HIGH);
BENCHMARK(SignTransactionECDSA);
BENCHMARK(SignTransactionSchnorr);
BENCHMARK(SignSchnorrWithMerkleRoot);
BENCHMARK(SignSchnorrWithNullMerkleRoot);

View File

@@ -30,4 +30,4 @@ static void FindByte(benchmark::Bench& bench)
assert(file.fclose() == 0);
}
BENCHMARK(FindByte, benchmark::PriorityLevel::HIGH);
BENCHMARK(FindByte);

View File

@@ -18,4 +18,4 @@ static void HexStrBench(benchmark::Bench& bench)
});
}
BENCHMARK(HexStrBench, benchmark::PriorityLevel::HIGH);
BENCHMARK(HexStrBench);

View File

@@ -123,4 +123,4 @@ void BenchTxGraphTrim(benchmark::Bench& bench)
static void TxGraphTrim(benchmark::Bench& bench) { BenchTxGraphTrim(bench); }
BENCHMARK(TxGraphTrim, benchmark::PriorityLevel::HIGH);
BENCHMARK(TxGraphTrim);

View File

@@ -262,7 +262,7 @@ static void OrphanageEraseForPeer(benchmark::Bench& bench)
OrphanageEraseAll(bench, /*block_or_disconnect=*/false);
}
BENCHMARK(OrphanageSinglePeerEviction, benchmark::PriorityLevel::LOW);
BENCHMARK(OrphanageMultiPeerEviction, benchmark::PriorityLevel::LOW);
BENCHMARK(OrphanageEraseForBlock, benchmark::PriorityLevel::LOW);
BENCHMARK(OrphanageEraseForPeer, benchmark::PriorityLevel::LOW);
BENCHMARK(OrphanageSinglePeerEviction);
BENCHMARK(OrphanageMultiPeerEviction);
BENCHMARK(OrphanageEraseForBlock);
BENCHMARK(OrphanageEraseForPeer);

View File

@@ -36,7 +36,7 @@ static void BenchTimeMillisSys(benchmark::Bench& bench)
});
}
BENCHMARK(BenchTimeDeprecated, benchmark::PriorityLevel::HIGH);
BENCHMARK(BenchTimeMillis, benchmark::PriorityLevel::HIGH);
BENCHMARK(BenchTimeMillisSys, benchmark::PriorityLevel::HIGH);
BENCHMARK(BenchTimeMock, benchmark::PriorityLevel::HIGH);
BENCHMARK(BenchTimeDeprecated);
BENCHMARK(BenchTimeMillis);
BENCHMARK(BenchTimeMillisSys);
BENCHMARK(BenchTimeMock);

View File

@@ -87,5 +87,5 @@ static void VerifyNestedIfScript(benchmark::Bench& bench)
});
}
BENCHMARK(VerifyScriptBench, benchmark::PriorityLevel::HIGH);
BENCHMARK(VerifyNestedIfScript, benchmark::PriorityLevel::HIGH);
BENCHMARK(VerifyScriptBench);
BENCHMARK(VerifyNestedIfScript);

View File

@@ -64,8 +64,8 @@ static void WalletBalanceClean(benchmark::Bench& bench) { WalletBalance(bench, /
static void WalletBalanceMine(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/true); }
static void WalletBalanceWatch(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/false); }
BENCHMARK(WalletBalanceDirty, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceClean, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceMine, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceWatch, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceDirty);
BENCHMARK(WalletBalanceClean);
BENCHMARK(WalletBalanceMine);
BENCHMARK(WalletBalanceWatch);
} // namespace wallet

View File

@@ -60,7 +60,7 @@ static void WalletCreate(benchmark::Bench& bench, bool encrypted)
static void WalletCreatePlain(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/false); }
static void WalletCreateEncrypted(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/true); }
BENCHMARK(WalletCreatePlain, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletCreateEncrypted, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletCreatePlain);
BENCHMARK(WalletCreateEncrypted);
} // namespace wallet

View File

@@ -215,6 +215,6 @@ static void WalletCreateTxUsePresetInputsAndCoinSelection(benchmark::Bench& benc
static void WalletAvailableCoins(benchmark::Bench& bench) { AvailableCoins(bench, {OutputType::BECH32M}); }
BENCHMARK(WalletCreateTxUseOnlyPresetInputs, benchmark::PriorityLevel::LOW)
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection, benchmark::PriorityLevel::LOW)
BENCHMARK(WalletAvailableCoins, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletCreateTxUseOnlyPresetInputs);
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection);
BENCHMARK(WalletAvailableCoins);

View File

@@ -66,6 +66,6 @@ static void WalletIsMine(benchmark::Bench& bench, int num_combo = 0)
static void WalletIsMineDescriptors(benchmark::Bench& bench) { WalletIsMine(bench); }
static void WalletIsMineMigratedDescriptors(benchmark::Bench& bench) { WalletIsMine(bench, /*num_combo=*/2000); }
BENCHMARK(WalletIsMineDescriptors, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletIsMineMigratedDescriptors, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletIsMineDescriptors);
BENCHMARK(WalletIsMineMigratedDescriptors);
} // namespace wallet

View File

@@ -64,5 +64,5 @@ static void WalletLoadingDescriptors(benchmark::Bench& bench)
});
}
BENCHMARK(WalletLoadingDescriptors, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletLoadingDescriptors);
} // namespace wallet

View File

@@ -74,6 +74,6 @@ static void WalletMigration(benchmark::Bench& bench)
});
}
BENCHMARK(WalletMigration, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletMigration);
} // namespace wallet