Bitcoin ABC 0.30.7
P2P Digital Currency
Functions
load_external.cpp File Reference
#include <bench/bench.h>
#include <bench/data.h>
#include <chainparams.h>
#include <test/util/setup_common.h>
#include <validation.h>
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)
 

Function Documentation

◆ BENCHMARK()

BENCHMARK ( LoadExternalBlockFile  )

◆ 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 24 of file load_external.cpp.

Here is the call graph for this function: