mirror of
https://github.com/XRPLF/rippled.git
synced 2026-10-03 02:08:05 +00:00
28 lines
736 B
C++
28 lines
736 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
|
|
txNestedArrayLenImpl(benchmark::State& state)
|
|
{
|
|
static constexpr auto kWasmName = std::string_view{"tx_inner_arr_len"};
|
|
|
|
benchmarkImpl(
|
|
state,
|
|
kWasmName,
|
|
[] { return Fixtures::instance().host(); },
|
|
[](auto& host) { return host.getTxNestedArrayLen(FieldLocator{{sfMemos.getCode()}}); });
|
|
}
|
|
BENCHMARK(txNestedArrayLenImpl)->UseManualTime()->Iterations(kBenchIterations);
|
|
|
|
} // namespace
|
|
} // namespace xrpl::test::bench
|