xrpld
Loading...
Searching...
No Matches
xrpl::perf Namespace Reference

Dummy class for unit tests. More...

Classes

struct  Locked
 A box coupling data with a mutex for locking access to it. More...
class  PerfLog
 Singleton class that maintains performance counters and optionally writes Json-formatted data to a distinct log. More...
class  PerfLogImp
 Implementation class for PerfLog. More...
class  PerfLogTest

Functions

PerfLog::Setup setupPerfLog (Section const &section, std::filesystem::path const &configDir)
std::unique_ptr< PerfLog > makePerfLog (PerfLog::Setup const &setup, Application &app, std::span< NullTerminatedView const > methodNames, beast::Journal journal, std::function< void()> &&signalStop)
template<typename Func, class Rep, class Period>
auto measureDurationAndLog (Func &&func, std::string_view actionDescription, std::chrono::duration< Rep, Period > maxDelay, beast::Journal const &journal)

Detailed Description

Dummy class for unit tests.

Function Documentation

◆ setupPerfLog()

PerfLog::Setup xrpl::perf::setupPerfLog ( Section const & section,
std::filesystem::path const & configDir )

Definition at line 500 of file PerfLogImp.cpp.

◆ makePerfLog()

std::unique_ptr< PerfLog > xrpl::perf::makePerfLog ( PerfLog::Setup const & setup,
Application & app,
std::span< NullTerminatedView const > methodNames,
beast::Journal journal,
std::function< void()> && signalStop )
Parameters
methodNamesThe RPC methods to count, one counter per name. Reported as JSON keys that borrow each name and read it as a C string, which is why the parameter type requires one that reaches its terminating null. The names must outlive the returned object, which holds views of them. The range itself need not: it is copied. Passed in rather than looked up here, so that this layer needs no knowledge of the dispatch table.

Definition at line 521 of file PerfLogImp.cpp.

◆ measureDurationAndLog()

template<typename Func, class Rep, class Period>
auto xrpl::perf::measureDurationAndLog ( Func && func,
std::string_view actionDescription,
std::chrono::duration< Rep, Period > maxDelay,
beast::Journal const & journal )

Definition at line 174 of file PerfLog.h.