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

27 lines
678 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
oracleKeyletImpl(benchmark::State& state)
{
static constexpr auto kWasmName = std::string_view{"oracle_id"};
benchmarkImpl(
state,
kWasmName,
[] { return Fixtures::instance().host(); },
[](auto& host) {
return host.oracleKeylet(Fixtures::instance().alice().id(), Fixtures::kSeq);
});
}
BENCHMARK(oracleKeyletImpl)->UseManualTime()->Iterations(kBenchIterations);
} // namespace
} // namespace xrpl::test::bench