include a big block in test_data, use it for ser/de benchmark

This commit is contained in:
Riccardo Casatta 2021-12-31 11:34:24 +01:00
parent 09dada55d6
commit f5a9681a2a
No known key found for this signature in database
GPG Key ID: FD986A969E450397
2 changed files with 3 additions and 3 deletions

View File

@ -507,7 +507,7 @@ mod benches {
#[bench]
pub fn bench_block_serialize(bh: &mut Bencher) {
let raw_block = include_bytes!("../../test_data/testnet_block_000000000000045e0b1660b6445b5e5c5ab63c9a4f956be7e1e69be04fa4497b.raw");
let raw_block = include_bytes!("../../test_data/mainnet_block_000000000000000000000c835b2adcaedc20fdf6ee440009c249452c726dafae.raw");
let block: Block = deserialize(&raw_block[..]).unwrap();
@ -522,7 +522,7 @@ mod benches {
#[bench]
pub fn bench_block_serialize_logic(bh: &mut Bencher) {
let raw_block = include_bytes!("../../test_data/testnet_block_000000000000045e0b1660b6445b5e5c5ab63c9a4f956be7e1e69be04fa4497b.raw");
let raw_block = include_bytes!("../../test_data/mainnet_block_000000000000000000000c835b2adcaedc20fdf6ee440009c249452c726dafae.raw");
let block: Block = deserialize(&raw_block[..]).unwrap();
@ -534,7 +534,7 @@ mod benches {
#[bench]
pub fn bench_block_deserialize(bh: &mut Bencher) {
let raw_block = include_bytes!("../../test_data/testnet_block_000000000000045e0b1660b6445b5e5c5ab63c9a4f956be7e1e69be04fa4497b.raw");
let raw_block = include_bytes!("../../test_data/mainnet_block_000000000000000000000c835b2adcaedc20fdf6ee440009c249452c726dafae.raw");
bh.iter(|| {
let block: Block = deserialize(&raw_block[..]).unwrap();