Add 32MB block versions of existing 1MB block benchmarks
This makes the following changes to the available benchmarks:
- Renames
DeserializeBlockTest
toDeserializeBlockTest_1MB
and addsDeserializeBlockTest_32MB
. - Renames
DeserializeAndCheckBlockTest
toDeserializeAndCheckBlockTest_1MB
and addsDeserializeAndCheckBlockTest_32MB
. - Renames
BlockToJsonVerbose
toBlockToJsonVerbose_1MB
and addsBlockToJsonVerbose_32MB
. - Renames
JsonReadWrite1MBBlock
toJsonReadWriteBlock_1MB
and addsJsonReadWriteBlock_32MB
.
Mainnet block 556034 (hash
000000000000000000eb279368d5e158e5ef011010c98da89245f176e2083d64
) is
used as the 32MB block for the new benchmarks. The 1MB block still is
mainnet block 413567
(0000000000000000025aff8be8a55df8f89c77296db6198f272d6577325d4069
), as
before.
convert-raw-files.py
is changed to make large data files digestible
for the compiler/linker; specifically, it uses a string literal instead
of an initializer list. Previously, the 1MB raw block file turned into a
5MB cpp file, and the 32MB raw block file turned into a 160MB generated
cpp file - the latter needs more than 7GB memory to compile and crashes
my computer due to running out of memory. Now, the 1MB raw block file
turns into a 2.6MB cpp file, and the 32MB raw block file turns into a
83.0MB cpp file, both of which compile and link fine.
Together with !120 (merged), this replaces !104 (closed).
Test plan:
- Run
convert-raw-files.py
(insrc/bench/data
) and verify the output files are as committed ninja bench_bitcoin
-
src/bench/bench_bitcoin -evals=1
- note thatDeserializeAndCheckBlockTest
asserts that the blocks are valid (so block data is encoded correctly)