Files
rippled/src/benchmarks/libxrpl/wasm/host_functions/DepositPreauthKeylet.cpp
2026-09-02 17:03:47 -04:00

28 lines
745 B
C++

#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
depositPreauthKeyletImpl(benchmark::State& state)
{
static constexpr auto kWasmName = std::string_view{"deposit_preauth_id"};
benchmarkImpl(
state,
kWasmName,
[] { return Fixtures::instance().host(); },
[](auto& host) {
return host.depositPreauthKeylet(
Fixtures::instance().alice().id(), Fixtures::instance().bob().id());
});
}
BENCHMARK(depositPreauthKeyletImpl)->UseManualTime()->Iterations(kBenchIterations);
} // namespace
} // namespace xrpl::test::bench