File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ bench_bench_bitcoin_SOURCES = \
44
44
bench/rollingbloom.cpp \
45
45
bench/rpc_blockchain.cpp \
46
46
bench/rpc_mempool.cpp \
47
+ bench/strencodings.cpp \
47
48
bench/util_time.cpp \
48
49
bench/verify_script.cpp
49
50
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2022 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ #include < bench/bench.h>
6
+ #include < bench/data.h>
7
+ #include < util/strencodings.h>
8
+
9
+ static void HexStrBench (benchmark::Bench& bench)
10
+ {
11
+ auto const & data = benchmark::data::block413567;
12
+ bench.batch (data.size ()).unit (" byte" ).run ([&] {
13
+ auto hex = HexStr (data);
14
+ ankerl::nanobench::doNotOptimizeAway (hex);
15
+ });
16
+ }
17
+
18
+ BENCHMARK (HexStrBench);
You can’t perform that action at this time.
0 commit comments