Page MenuHomePhabricator

Add benchmark to write JSON into a string
ClosedPublic

Authored by PiRK on Jan 24 2023, 10:00.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa13b242fa6d4: Add benchmark to write JSON into a string
Summary

The benchmark BlockToJsonVerbose only tests generating (and destroying)
the JSON data structure, but serializing into a string is also a
performance critical aspect of the RPC calls.

Also, use ankerl::nanobench::doNotOptimizeAway to make sure the compiler
can't optimize the result of the calls away.

This is a backport of core#21170
Depends on D13039

Test Plan

ninja bench-bitcoin

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 24 2023, 10:00
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/bench/rpc_blockchain.cpp
44 ↗(On Diff #37668)
54 ↗(On Diff #37668)

dito

This revision is now accepted and ready to land.Jan 24 2023, 10:20

fix clang-tidy named parameters