mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 07:26:51 +00:00
30 lines
771 B
C++
30 lines
771 B
C++
#include <xrpl/protocol/SField.h>
|
|
#include <xrpl/tx/wasm/WasmCommon.h>
|
|
|
|
#include <benchmark/benchmark.h>
|
|
#include <benchmarks/libxrpl/wasm/BenchFixtures.h>
|
|
#include <benchmarks/libxrpl/wasm/WasmBench.h>
|
|
|
|
#include <string_view>
|
|
|
|
namespace xrpl::test::bench {
|
|
namespace {
|
|
|
|
void
|
|
ledgerObjNestedFieldImpl(benchmark::State& state)
|
|
{
|
|
static constexpr auto kWasmName = std::string_view{"le_inner"};
|
|
|
|
benchmarkImpl(
|
|
state,
|
|
kWasmName,
|
|
[] { return Fixtures::instance().cachedHost(); },
|
|
[](auto& host) {
|
|
return host.getLedgerObjNestedField(1, FieldLocator{{sfAccount.getCode()}});
|
|
});
|
|
}
|
|
BENCHMARK(ledgerObjNestedFieldImpl)->UseManualTime()->Iterations(kBenchIterations);
|
|
|
|
} // namespace
|
|
} // namespace xrpl::test::bench
|