bench: explicitly make all current benchmarks "high" priority

no-functional changes. Only have set the priority level explicitly
on every BENCHMARK macro call.
This commit is contained in:
furszy
2022-09-25 12:25:16 -03:00
parent 05b8c76232
commit 3da7cd2a76
33 changed files with 93 additions and 93 deletions

View File

@@ -133,7 +133,7 @@ static void AddrManAddThenGood(benchmark::Bench& bench)
}); });
} }
BENCHMARK(AddrManAdd); BENCHMARK(AddrManAdd, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManSelect); BENCHMARK(AddrManSelect, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManGetAddr); BENCHMARK(AddrManGetAddr, benchmark::PriorityLevel::HIGH);
BENCHMARK(AddrManAddThenGood); BENCHMARK(AddrManAddThenGood, benchmark::PriorityLevel::HIGH);

View File

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

View File

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

View File

@@ -76,7 +76,7 @@ public:
} // namespace benchmark } // namespace benchmark
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo", foo, priority_level); // BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo", foo, priority_level);
#define BENCHMARK(n) \ #define BENCHMARK(n, priority_level) \
benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n, benchmark::PriorityLevel::HIGH); benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n, priority_level);
#endif // BITCOIN_BENCH_BENCH_H #endif // BITCOIN_BENCH_BENCH_H

View File

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

View File

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

View File

@@ -39,6 +39,6 @@ static void CHACHA20_1MB(benchmark::Bench& bench)
CHACHA20(bench, BUFFER_SIZE_LARGE); CHACHA20(bench, BUFFER_SIZE_LARGE);
} }
BENCHMARK(CHACHA20_64BYTES); BENCHMARK(CHACHA20_64BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_256BYTES); BENCHMARK(CHACHA20_256BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_1MB); BENCHMARK(CHACHA20_1MB, benchmark::PriorityLevel::HIGH);

View File

@@ -115,12 +115,12 @@ static void HASH_1MB(benchmark::Bench& bench)
HASH(bench, BUFFER_SIZE_LARGE); HASH(bench, BUFFER_SIZE_LARGE);
} }
BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT); BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT); BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT); BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT); BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT); BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT, benchmark::PriorityLevel::HIGH);
BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT); BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT, benchmark::PriorityLevel::HIGH);
BENCHMARK(HASH_64BYTES); BENCHMARK(HASH_64BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(HASH_256BYTES); BENCHMARK(HASH_256BYTES, benchmark::PriorityLevel::HIGH);
BENCHMARK(HASH_1MB); BENCHMARK(HASH_1MB, benchmark::PriorityLevel::HIGH);

View File

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

View File

@@ -70,4 +70,4 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
queue.StopWorkerThreads(); queue.StopWorkerThreads();
ECC_Stop(); ECC_Stop();
} }
BENCHMARK(CCheckQueueSpeedPrevectorJob); BENCHMARK(CCheckQueueSpeedPrevectorJob, benchmark::PriorityLevel::HIGH);

View File

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

View File

@@ -150,19 +150,19 @@ static void MuHashPrecompute(benchmark::Bench& bench)
}); });
} }
BENCHMARK(RIPEMD160); BENCHMARK(RIPEMD160, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA1); BENCHMARK(SHA1, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256); BENCHMARK(SHA256, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA512); BENCHMARK(SHA512, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA3_256_1M); BENCHMARK(SHA3_256_1M, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256_32b); BENCHMARK(SHA256_32b, benchmark::PriorityLevel::HIGH);
BENCHMARK(SipHash_32b); BENCHMARK(SipHash_32b, benchmark::PriorityLevel::HIGH);
BENCHMARK(SHA256D64_1024); BENCHMARK(SHA256D64_1024, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_32bit); BENCHMARK(FastRandom_32bit, benchmark::PriorityLevel::HIGH);
BENCHMARK(FastRandom_1bit); BENCHMARK(FastRandom_1bit, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHash); BENCHMARK(MuHash, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashMul); BENCHMARK(MuHashMul, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashDiv); BENCHMARK(MuHashDiv, benchmark::PriorityLevel::HIGH);
BENCHMARK(MuHashPrecompute); BENCHMARK(MuHashPrecompute, benchmark::PriorityLevel::HIGH);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -41,8 +41,8 @@ static void LoggingNoFile(benchmark::Bench& bench)
}); });
} }
BENCHMARK(LoggingYoThreadNames); BENCHMARK(LoggingYoThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LoggingNoThreadNames); BENCHMARK(LoggingNoThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LoggingYoCategory); BENCHMARK(LoggingYoCategory, benchmark::PriorityLevel::HIGH);
BENCHMARK(LoggingNoCategory); BENCHMARK(LoggingNoCategory, benchmark::PriorityLevel::HIGH);
BENCHMARK(LoggingNoFile); BENCHMARK(LoggingNoFile, benchmark::PriorityLevel::HIGH);

View File

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

View File

@@ -114,5 +114,5 @@ static void MempoolCheck(benchmark::Bench& bench)
}); });
} }
BENCHMARK(ComplexMemPool); BENCHMARK(ComplexMemPool, benchmark::PriorityLevel::HIGH);
BENCHMARK(MempoolCheck); BENCHMARK(MempoolCheck, benchmark::PriorityLevel::HIGH);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -45,7 +45,7 @@ static void BlockToJsonVerbose(benchmark::Bench& bench)
}); });
} }
BENCHMARK(BlockToJsonVerbose); BENCHMARK(BlockToJsonVerbose, benchmark::PriorityLevel::HIGH);
static void BlockToJsonVerboseWrite(benchmark::Bench& bench) static void BlockToJsonVerboseWrite(benchmark::Bench& bench)
{ {
@@ -57,4 +57,4 @@ static void BlockToJsonVerboseWrite(benchmark::Bench& bench)
}); });
} }
BENCHMARK(BlockToJsonVerboseWrite); BENCHMARK(BlockToJsonVerboseWrite, benchmark::PriorityLevel::HIGH);

View File

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

View File

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

View File

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

View File

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

View File

@@ -57,7 +57,7 @@ static void WalletBalanceClean(benchmark::Bench& bench) { WalletBalance(bench, /
static void WalletBalanceMine(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/true); } 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); } static void WalletBalanceWatch(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/false); }
BENCHMARK(WalletBalanceDirty); BENCHMARK(WalletBalanceDirty, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceClean); BENCHMARK(WalletBalanceClean, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceMine); BENCHMARK(WalletBalanceMine, benchmark::PriorityLevel::HIGH);
BENCHMARK(WalletBalanceWatch); BENCHMARK(WalletBalanceWatch, benchmark::PriorityLevel::HIGH);

View File

@@ -118,10 +118,10 @@ static void WalletLoading(benchmark::Bench& bench, bool legacy_wallet)
#ifdef USE_BDB #ifdef USE_BDB
static void WalletLoadingLegacy(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/true); } static void WalletLoadingLegacy(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/true); }
BENCHMARK(WalletLoadingLegacy); BENCHMARK(WalletLoadingLegacy, benchmark::PriorityLevel::HIGH);
#endif #endif
#ifdef USE_SQLITE #ifdef USE_SQLITE
static void WalletLoadingDescriptors(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/false); } static void WalletLoadingDescriptors(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/false); }
BENCHMARK(WalletLoadingDescriptors); BENCHMARK(WalletLoadingDescriptors, benchmark::PriorityLevel::HIGH);
#endif #endif