mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 09:53:47 +01:00
Merge bitcoin/bitcoin#30716: bench: [refactor] iwyu
fab0e834b8
bench: [refactor] iwyu (MarcoFalke) Pull request description: Missing includes are problematic, because: * Upcoming releases of a C++ standard library implementation often minimize their internal header dependencies. For example, `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` (https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html). This can lead to compile failures, which are easy to fix for developers, but may not be for users. For example, commit138f867156
had to add missing includes to accommodate GCC 15 (and the commit had to be backported). * A Bitcoin Core developer removing a feature from a module and wanting to drop the now unused includes may not be able to do so without touching other unrelated files, because those files rely on the transitive includes. Moreover, missing or extraneous includes are problematic, because they may be confusing the code reader as to what the real dependencies are. Finally, extraneous includes may slow down the build. Fix all issues in `bench`, by applying the rule include-what-you-use (iwyu). Follow-up pull requests will handle the other places. ACKs for top commit: hodlinator: ACKfab0e834b8
achow101: ACKfab0e834b8
TheCharlatan: ACKfab0e834b8
hebasto: ACKfab0e834b8
. brunoerg: crACKfab0e834b8
stickies-v: ACKfab0e834b8
Tree-SHA512: f079c05d3ddebafabbd5a6c76d43d17337d1a962b97ba0ee27612f91c58491e7ce4e4229be54bd6e75a15512798c6f59925d0a076a37c050f8b9ef455ae5c9a2
This commit is contained in:
commit
dc90542a9e
@ -4,12 +4,18 @@
|
||||
|
||||
#include <addrman.h>
|
||||
#include <bench/bench.h>
|
||||
#include <compat/compat.h>
|
||||
#include <netaddress.h>
|
||||
#include <netbase.h>
|
||||
#include <netgroup.h>
|
||||
#include <protocol.h>
|
||||
#include <random.h>
|
||||
#include <span.h>
|
||||
#include <uint256.h>
|
||||
#include <util/check.h>
|
||||
#include <util/time.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
|
@ -2,11 +2,12 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <base58.h>
|
||||
#include <bench/bench.h>
|
||||
#include <span.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
@ -2,12 +2,10 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <bech32.h>
|
||||
#include <bench/bench.h>
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
@ -4,16 +4,21 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <test/util/setup_common.h>
|
||||
#include <test/util/setup_common.h> // IWYU pragma: keep
|
||||
#include <tinyformat.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 <vector>
|
||||
|
||||
|
@ -5,17 +5,18 @@
|
||||
#ifndef BITCOIN_BENCH_BENCH_H
|
||||
#define BITCOIN_BENCH_BENCH_H
|
||||
|
||||
#include <bench/nanobench.h> // IWYU pragma: export
|
||||
#include <util/fs.h>
|
||||
#include <util/macros.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <bench/nanobench.h> // IWYU pragma: export
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
|
||||
|
@ -3,15 +3,16 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <clientversion.h>
|
||||
#include <common/args.h>
|
||||
#include <crypto/sha256.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
@ -3,12 +3,12 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <key.h>
|
||||
#include <pubkey.h>
|
||||
#include <random.h>
|
||||
#include <span.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
|
@ -3,17 +3,21 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <crypto/sha256.h>
|
||||
#include <consensus/consensus.h>
|
||||
#include <node/miner.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <random.h>
|
||||
#include <script/script.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/mining.h>
|
||||
#include <test/util/script.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <txmempool.h>
|
||||
#include <validation.h>
|
||||
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
static void AssembleBlock(benchmark::Bench& bench)
|
||||
|
@ -4,10 +4,15 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <coins.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <key.h>
|
||||
#include <policy/policy.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
#include <script/signingprovider.h>
|
||||
#include <test/util/transaction_utils.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
|
||||
// Microbenchmark for simple accesses to a CCoinsViewCache database. Note from
|
||||
|
@ -6,6 +6,11 @@
|
||||
#include <bench/bench.h>
|
||||
#include <crypto/chacha20.h>
|
||||
#include <crypto/chacha20poly1305.h>
|
||||
#include <span.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
/* Number of bytes to process per iteration */
|
||||
static const uint64_t BUFFER_SIZE_TINY = 64;
|
||||
|
@ -4,14 +4,23 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <bench/data.h>
|
||||
|
||||
#include <chainparams.h>
|
||||
#include <common/args.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <serialize.h>
|
||||
#include <span.h>
|
||||
#include <streams.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
// These are the two major time-sinks which happen after we have fully received
|
||||
// a block off the wire, but before we can relay the block on to peers using
|
||||
// compact block relay.
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include <test/util/setup_common.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
static void CheckBlockIndex(benchmark::Bench& bench)
|
||||
{
|
||||
auto testing_setup{MakeNoLogFileContext<TestChain100Setup>()};
|
||||
|
@ -7,9 +7,11 @@
|
||||
#include <common/system.h>
|
||||
#include <key.h>
|
||||
#include <prevector.h>
|
||||
#include <pubkey.h>
|
||||
#include <random.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
static const size_t BATCHES = 101;
|
||||
|
@ -3,9 +3,13 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <util/bitset.h>
|
||||
#include <cluster_linearize.h>
|
||||
#include <util/bitset.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
using namespace cluster_linearize;
|
||||
|
||||
|
@ -3,15 +3,28 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <node/context.h>
|
||||
#include <outputtype.h>
|
||||
#include <policy/feerate.h>
|
||||
#include <policy/policy.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <random.h>
|
||||
#include <sync.h>
|
||||
#include <util/result.h>
|
||||
#include <wallet/coinselection.h>
|
||||
#include <wallet/spend.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <wallet/transaction.h>
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using node::NodeContext;
|
||||
using wallet::AttemptSelection;
|
||||
|
@ -11,11 +11,14 @@
|
||||
#include <crypto/sha3.h>
|
||||
#include <crypto/sha512.h>
|
||||
#include <crypto/siphash.h>
|
||||
#include <hash.h>
|
||||
#include <random.h>
|
||||
#include <span.h>
|
||||
#include <tinyformat.h>
|
||||
#include <uint256.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
/* Number of bytes to hash per iteration */
|
||||
static const uint64_t BUFFER_SIZE = 1000*1000;
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include <bench/data.h>
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace benchmark {
|
||||
namespace data {
|
||||
|
||||
|
@ -4,11 +4,16 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <key.h>
|
||||
#include <pubkey.h>
|
||||
#include <script/descriptor.h>
|
||||
#include <script/script.h>
|
||||
#include <script/signingprovider.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
static void ExpandDescriptor(benchmark::Bench& bench)
|
||||
{
|
||||
|
@ -5,9 +5,18 @@
|
||||
#include <bench/bench.h>
|
||||
#include <kernel/disconnected_transactions.h>
|
||||
#include <primitives/block.h>
|
||||
#include <test/util/random.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
#include <test/util/setup_common.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
constexpr size_t BLOCK_VTX_COUNT{4000};
|
||||
constexpr size_t BLOCK_VTX_COUNT_10PERCENT{400};
|
||||
|
||||
|
@ -3,15 +3,28 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <consensus/consensus.h>
|
||||
#include <consensus/merkle.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <pow.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <random.h>
|
||||
#include <script/script.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <txmempool.h>
|
||||
#include <uint256.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
static void DuplicateInputs(benchmark::Bench& bench)
|
||||
{
|
||||
|
@ -3,9 +3,14 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <key.h>
|
||||
#include <pubkey.h>
|
||||
#include <random.h>
|
||||
#include <span.h>
|
||||
#include <uint256.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
static void EllSwiftCreate(benchmark::Bench& bench)
|
||||
{
|
||||
|
@ -4,6 +4,11 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <blockfilter.h>
|
||||
#include <uint256.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
static GCSFilter::ElementSet GenerateGCSTestElements()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <hash.h>
|
||||
#include <crypto/sha256.h>
|
||||
#include <random.h>
|
||||
#include <uint256.h>
|
||||
|
||||
|
@ -2,14 +2,28 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <addresstype.h>
|
||||
#include <bench/bench.h>
|
||||
#include <blockfilter.h>
|
||||
#include <chain.h>
|
||||
#include <index/base.h>
|
||||
#include <index/blockfilterindex.h>
|
||||
#include <node/chainstate.h>
|
||||
#include <node/context.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <pubkey.h>
|
||||
#include <script/script.h>
|
||||
#include <span.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <uint256.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/time.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
// Very simple block filter index sync benchmark, only using coinbase outputs.
|
||||
static void BlockFilterIndexSync(benchmark::Bench& bench)
|
||||
|
@ -5,11 +5,22 @@
|
||||
#include <bench/bench.h>
|
||||
#include <bench/data.h>
|
||||
#include <chainparams.h>
|
||||
#include <clientversion.h>
|
||||
#include <flatfile.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <span.h>
|
||||
#include <streams.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <uint256.h>
|
||||
#include <util/fs.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* The LoadExternalBlockFile() function is used during -reindex and -loadblock.
|
||||
*
|
||||
|
@ -3,9 +3,10 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <support/lockedpool.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#define ASIZE 2048
|
||||
|
@ -5,7 +5,9 @@
|
||||
#include <bench/bench.h>
|
||||
#include <logging.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/chaintype.h>
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
// All but 2 of the benchmarks should have roughly similar performance:
|
||||
//
|
||||
|
@ -3,10 +3,19 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <kernel/mempool_entry.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <kernel/cs_main.h>
|
||||
#include <policy/policy.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <txmempool.h>
|
||||
#include <util/check.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
static void AddTx(const CTransactionRef& tx, const CAmount& nFee, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)
|
||||
|
@ -3,16 +3,23 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <kernel/mempool_entry.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <policy/policy.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <random.h>
|
||||
#include <script/script.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <txmempool.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class CCoinsViewCache;
|
||||
|
||||
static void AddTx(const CTransactionRef& tx, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)
|
||||
{
|
||||
int64_t nTime = 0;
|
||||
|
@ -3,11 +3,12 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <consensus/merkle.h>
|
||||
#include <random.h>
|
||||
#include <uint256.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
static void MerkleRoot(benchmark::Bench& bench)
|
||||
{
|
||||
FastRandomContext rng(true);
|
||||
|
@ -3,13 +3,12 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <net.h>
|
||||
#include <netaddress.h>
|
||||
#include <node/eviction.h>
|
||||
#include <random.h>
|
||||
#include <test/util/net.h>
|
||||
#include <test/util/setup_common.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
|
@ -5,9 +5,12 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <crypto/poly1305.h>
|
||||
|
||||
#include <span.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
/* Number of bytes to process per iteration */
|
||||
static constexpr uint64_t BUFFER_SIZE_TINY = 64;
|
||||
static constexpr uint64_t BUFFER_SIZE_SMALL = 256;
|
||||
|
@ -5,7 +5,11 @@
|
||||
#include <bench/bench.h>
|
||||
#include <support/allocators/pool.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
template <typename Map>
|
||||
void BenchFillClearMap(benchmark::Bench& bench, Map& map)
|
||||
|
@ -3,11 +3,13 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <prevector.h>
|
||||
#include <serialize.h>
|
||||
#include <streams.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <serialize.h>
|
||||
#include <streams.h>
|
||||
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
struct nontrivial_t {
|
||||
int x{-1};
|
||||
|
@ -5,7 +5,9 @@
|
||||
#include <bench/bench.h>
|
||||
#include <random.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
|
||||
namespace {
|
||||
|
@ -4,14 +4,21 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <bench/data.h>
|
||||
|
||||
#include <consensus/validation.h>
|
||||
#include <flatfile.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <serialize.h>
|
||||
#include <span.h>
|
||||
#include <streams.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
static FlatFilePos WriteBlockToDisk(ChainstateManager& chainman)
|
||||
{
|
||||
DataStream stream{benchmark::data::block413567};
|
||||
|
@ -6,7 +6,9 @@
|
||||
#include <bench/bench.h>
|
||||
#include <common/bloom.h>
|
||||
#include <crypto/common.h>
|
||||
#include <span.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
static void RollingBloom(benchmark::Bench& bench)
|
||||
|
@ -4,14 +4,22 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <bench/data.h>
|
||||
|
||||
#include <chain.h>
|
||||
#include <core_io.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <rpc/blockchain.h>
|
||||
#include <serialize.h>
|
||||
#include <span.h>
|
||||
#include <streams.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <uint256.h>
|
||||
#include <univalue.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <univalue.h>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -3,14 +3,19 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <kernel/cs_main.h>
|
||||
#include <kernel/mempool_entry.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <rpc/mempool.h>
|
||||
#include <script/script.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <txmempool.h>
|
||||
#include <util/chaintype.h>
|
||||
|
||||
#include <univalue.h>
|
||||
#include <util/check.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
static void AddTx(const CTransactionRef& tx, const CAmount& fee, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)
|
||||
|
@ -2,8 +2,8 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <addresstype.h>
|
||||
#include <bench/bench.h>
|
||||
#include <coins.h>
|
||||
#include <key.h>
|
||||
#include <primitives/transaction.h>
|
||||
@ -11,10 +11,16 @@
|
||||
#include <script/interpreter.h>
|
||||
#include <script/script.h>
|
||||
#include <script/sign.h>
|
||||
#include <uint256.h>
|
||||
#include <script/signingprovider.h>
|
||||
#include <span.h>
|
||||
#include <test/util/random.h>
|
||||
#include <uint256.h>
|
||||
#include <util/translation.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
enum class InputType {
|
||||
P2WPKH, // segwitv0, witness-pubkey-hash (ECDSA signature)
|
||||
P2TR, // segwitv1, taproot key-path spend (Schnorr signature)
|
||||
|
@ -4,8 +4,11 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <bench/data.h>
|
||||
#include <span.h>
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
static void HexStrBench(benchmark::Bench& bench)
|
||||
{
|
||||
auto const& data = benchmark::data::block413567;
|
||||
|
@ -3,13 +3,20 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <hash.h>
|
||||
#include <key.h>
|
||||
#include <script/script.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <pubkey.h>
|
||||
#include <script/interpreter.h>
|
||||
#include <streams.h>
|
||||
#include <script/script.h>
|
||||
#include <span.h>
|
||||
#include <test/util/transaction_utils.h>
|
||||
#include <uint256.h>
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
// Microbenchmark for verification of a basic P2WPKH script. Can be easily
|
||||
// modified to measure performance of other types of scripts.
|
||||
|
@ -4,16 +4,24 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <node/chainstate.h>
|
||||
#include <node/context.h>
|
||||
#include <kernel/chainparams.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/mining.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <validationinterface.h>
|
||||
#include <uint256.h>
|
||||
#include <util/time.h>
|
||||
#include <validation.h>
|
||||
#include <wallet/receive.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/walletutil.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace wallet {
|
||||
static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const bool add_mine)
|
||||
|
@ -2,14 +2,25 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <node/context.h>
|
||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||
#include <random.h>
|
||||
#include <support/allocators/secure.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <uint256.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/translation.h>
|
||||
#include <wallet/context.h>
|
||||
#include <wallet/db.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/walletutil.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace wallet {
|
||||
static void WalletCreate(benchmark::Bench& bench, bool encrypted)
|
||||
|
@ -2,17 +2,42 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <addresstype.h>
|
||||
#include <bench/bench.h>
|
||||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <wallet/coincontrol.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <consensus/consensus.h>
|
||||
#include <consensus/merkle.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <kernel/chain.h>
|
||||
#include <node/context.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <outputtype.h>
|
||||
#include <policy/feerate.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <uint256.h>
|
||||
#include <util/result.h>
|
||||
#include <util/time.h>
|
||||
#include <validation.h>
|
||||
#include <versionbits.h>
|
||||
#include <wallet/coincontrol.h>
|
||||
#include <wallet/coinselection.h>
|
||||
#include <wallet/spend.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/walletutil.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using wallet::CWallet;
|
||||
using wallet::CreateMockableWalletDatabase;
|
||||
|
@ -2,20 +2,29 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||
#include <addresstype.h>
|
||||
#include <bench/bench.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||
#include <key.h>
|
||||
#include <key_io.h>
|
||||
#include <node/context.h>
|
||||
#include <script/descriptor.h>
|
||||
#include <script/script.h>
|
||||
#include <script/signingprovider.h>
|
||||
#include <sync.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/translation.h>
|
||||
#include <validationinterface.h>
|
||||
#include <wallet/context.h>
|
||||
#include <wallet/db.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <wallet/types.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/walletutil.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace wallet {
|
||||
static void WalletIsMine(benchmark::Bench& bench, bool legacy_wallet, int num_combo = 0)
|
||||
{
|
||||
|
@ -2,21 +2,25 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||
|
||||
#include <addresstype.h>
|
||||
#include <bench/bench.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <node/context.h>
|
||||
#include <test/util/mining.h>
|
||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||
#include <consensus/amount.h>
|
||||
#include <outputtype.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <util/translation.h>
|
||||
#include <validationinterface.h>
|
||||
#include <util/check.h>
|
||||
#include <wallet/context.h>
|
||||
#include <wallet/receive.h>
|
||||
#include <wallet/db.h>
|
||||
#include <wallet/test/util.h>
|
||||
#include <wallet/transaction.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/walletutil.h>
|
||||
|
||||
#include <optional>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace wallet{
|
||||
static void AddTx(CWallet& wallet)
|
||||
|
@ -3,8 +3,8 @@
|
||||
// file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
#include <bench/bench.h>
|
||||
|
||||
#include <random.h>
|
||||
#include <span.h>
|
||||
#include <streams.h>
|
||||
|
||||
#include <cstddef>
|
||||
|
Loading…
Reference in New Issue
Block a user