mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-05 10:17:30 -05:00
3da7cd2a76
no-functional changes. Only have set the priority level explicitly on every BENCHMARK macro call.
18 lines
578 B
C++
18 lines
578 B
C++
// Copyright (c) 2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <bench/bench.h>
|
|
#include <bench/data.h>
|
|
#include <util/strencodings.h>
|
|
|
|
static void HexStrBench(benchmark::Bench& bench)
|
|
{
|
|
auto const& data = benchmark::data::block413567;
|
|
bench.batch(data.size()).unit("byte").run([&] {
|
|
auto hex = HexStr(data);
|
|
ankerl::nanobench::doNotOptimizeAway(hex);
|
|
});
|
|
}
|
|
|
|
BENCHMARK(HexStrBench, benchmark::PriorityLevel::HIGH);
|