Bitcoin Core 28.99.0
P2P Digital Currency
Functions
load_external.cpp File Reference
#include <bench/bench.h>
#include <bench/data/block413567.raw.h>
#include <chainparams.h>
#include <flatfile.h>
#include <node/blockstorage.h>
#include <span.h>
#include <streams.h>
#include <test/util/setup_common.h>
#include <uint256.h>
#include <util/fs.h>
#include <validation.h>
#include <cstdint>
#include <cstdio>
#include <map>
#include <memory>
#include <stdexcept>
#include <vector>
Include dependency graph for load_external.cpp:

Go to the source code of this file.

Functions

static void LoadExternalBlockFile (benchmark::Bench &bench)
 The LoadExternalBlockFile() function is used during -reindex and -loadblock. More...
 
 BENCHMARK (LoadExternalBlockFile, benchmark::PriorityLevel::HIGH)
 

Function Documentation

◆ BENCHMARK()

◆ LoadExternalBlockFile()

static void LoadExternalBlockFile ( benchmark::Bench bench)
static

The LoadExternalBlockFile() function is used during -reindex and -loadblock.

Create a test file that's similar to a datadir/blocks/blk?????.dat file, It contains around 134 copies of the same block (typical size of real block files). For each block in the file, LoadExternalBlockFile() won't find its parent, and so will skip the block. (In the real system, it will re-read the block from disk later when it encounters its parent.)

This benchmark measures the performance of deserializing the block (or just its header, beginning with PR 16981).

Definition at line 36 of file load_external.cpp.

Here is the call graph for this function: