|
xrpld
|
Implementation class for PerfLog. More...
#include <PerfLogImp.h>


Classes | |
| struct | Counters |
| Track performance counters and currently executing tasks. More... | |
Public Types | |
| using | SteadyClock = std::chrono::steady_clock |
| using | SystemClock = std::chrono::system_clock |
| using | SteadyTimePoint = std::chrono::time_point<SteadyClock> |
| using | SystemTimePoint = std::chrono::time_point<SystemClock> |
| using | Seconds = std::chrono::seconds |
| using | Milliseconds = std::chrono::milliseconds |
| using | Microseconds = std::chrono::microseconds |
Public Member Functions | |
| PerfLogImp (Setup setup, Application &app, std::span< NullTerminatedView const > methodNames, beast::Journal journal, std::function< void()> &&signalStop) | |
| ~PerfLogImp () override | |
| void | rpcStart (std::string_view method, std::uint64_t const requestId) override |
| Log start of RPC call. | |
| void | rpcFinish (std::string_view method, std::uint64_t const requestId) override |
| Log successful finish of RPC call. | |
| void | rpcError (std::string_view method, std::uint64_t const requestId) override |
| Log errored RPC call. | |
| void | jobQueue (JobType const type) override |
| Log queued job. | |
| void | jobStart (JobType const type, Microseconds dur, SteadyTimePoint startTime, int instance) override |
| Log job executing. | |
| void | jobFinish (JobType const type, Microseconds dur, int instance) override |
| Log job finishing. | |
| json::Value | countersJson () const override |
| Render performance counters in Json. | |
| json::Value | currentJson () const override |
| Render currently executing jobs and RPC calls and durations in Json. | |
| void | resizeJobs (int const resize) override |
| Ensure enough room to store each currently executing job. | |
| void | rotate () override |
| Rotate perf log file. | |
| void | start () override |
| void | stop () override |
Private Member Functions | |
| void | openLog () |
| void | run () |
| void | report () |
| void | rpcEnd (std::string_view method, std::uint64_t const requestId, bool finish) |
Private Attributes | |
| Setup const | setup_ |
| Application & | app_ |
| beast::Journal const | j_ |
| std::function< void()> const | signalStop_ |
| Counters | counters_ |
| std::ofstream | logFile_ |
| std::thread | thread_ |
| std::mutex | mutex_ |
| std::condition_variable | cond_ |
| SystemTimePoint | lastLog_ |
| std::string const | hostname_ {boost::asio::ip::host_name()} |
| bool | stop_ {false} |
| bool | rotate_ {false} |
Implementation class for PerfLog.
Definition at line 54 of file PerfLogImp.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| xrpl::perf::PerfLogImp::PerfLogImp | ( | Setup | setup, |
| Application & | app, | ||
| std::span< NullTerminatedView const > | methodNames, | ||
| beast::Journal | journal, | ||
| std::function< void()> && | signalStop ) |
| methodNames | The RPC methods to count, one counter per name. The names must outlive this object, which holds views of them. Passed in rather than looked up here so that this layer needs to know nothing about the RPC dispatch table. |
Definition at line 317 of file PerfLogImp.cpp.
|
override |
Definition at line 332 of file PerfLogImp.cpp.
|
private |
Definition at line 231 of file PerfLogImp.cpp.
|
private |
Definition at line 264 of file PerfLogImp.cpp.
|
private |
Definition at line 288 of file PerfLogImp.cpp.
|
private |
Definition at line 359 of file PerfLogImp.cpp.
|
overridevirtual |
Log start of RPC call.
| method | RPC command |
| requestId | Unique identifier to track command |
Implements xrpl::perf::PerfLog.
Definition at line 338 of file PerfLogImp.cpp.
|
overridevirtual |
Log successful finish of RPC call.
| method | RPC command |
| requestId | Unique identifier to track command |
Implements xrpl::perf::PerfLog.
Definition at line 165 of file PerfLogImp.h.
|
overridevirtual |
Log errored RPC call.
| method | RPC command |
| requestId | Unique identifier to track command |
Implements xrpl::perf::PerfLog.
Definition at line 171 of file PerfLogImp.h.
|
overridevirtual |
Log queued job.
| type | Job type |
Implements xrpl::perf::PerfLog.
Definition at line 399 of file PerfLogImp.cpp.
|
overridevirtual |
Log job executing.
| type | Job type |
| dur | Duration enqueued in microseconds |
| startTime | Time that execution began |
| instance | JobQueue worker thread instance |
Implements xrpl::perf::PerfLog.
Definition at line 414 of file PerfLogImp.cpp.
|
overridevirtual |
Log job finishing.
| type | Job type |
| dur | Duration running in microseconds |
| instance | Jobqueue worker thread instance |
Implements xrpl::perf::PerfLog.
Definition at line 436 of file PerfLogImp.cpp.
|
overridevirtual |
Render performance counters in Json.
Implements xrpl::perf::PerfLog.
Definition at line 185 of file PerfLogImp.h.
|
overridevirtual |
Render currently executing jobs and RPC calls and durations in Json.
Implements xrpl::perf::PerfLog.
Definition at line 191 of file PerfLogImp.h.
|
overridevirtual |
Ensure enough room to store each currently executing job.
Implements xrpl::perf::PerfLog.
Definition at line 458 of file PerfLogImp.cpp.
|
overridevirtual |
Rotate perf log file.
Implements xrpl::perf::PerfLog.
Definition at line 466 of file PerfLogImp.cpp.
|
overridevirtual |
Reimplemented from xrpl::perf::PerfLog.
Definition at line 477 of file PerfLogImp.cpp.
|
overridevirtual |
Reimplemented from xrpl::perf::PerfLog.
Definition at line 484 of file PerfLogImp.cpp.
|
private |
Definition at line 122 of file PerfLogImp.h.
|
private |
Definition at line 123 of file PerfLogImp.h.
|
private |
Definition at line 124 of file PerfLogImp.h.
|
private |
Definition at line 125 of file PerfLogImp.h.
|
private |
Definition at line 126 of file PerfLogImp.h.
|
private |
Definition at line 127 of file PerfLogImp.h.
|
private |
Definition at line 128 of file PerfLogImp.h.
|
private |
Definition at line 129 of file PerfLogImp.h.
|
private |
Definition at line 130 of file PerfLogImp.h.
|
private |
Definition at line 131 of file PerfLogImp.h.
|
private |
Definition at line 132 of file PerfLogImp.h.
|
private |
Definition at line 133 of file PerfLogImp.h.
|
private |
Definition at line 134 of file PerfLogImp.h.