|
rippled
|
Implementation class for PerfLog. More...


Classes | |
| struct | Counters |
| Track performance counters and currently executing tasks. More... | |
Public Types | |
| using | steady_clock = std::chrono::steady_clock |
| using | system_clock = std::chrono::system_clock |
| using | steady_time_point = std::chrono::time_point< steady_clock > |
| using | system_time_point = std::chrono::time_point< system_clock > |
| using | seconds = std::chrono::seconds |
| using | milliseconds = std::chrono::milliseconds |
| using | microseconds = std::chrono::microseconds |
Public Member Functions | |
| PerfLogImp (Setup const &setup, Application &app, beast::Journal journal, std::function< void()> &&signalStop) | |
| ~PerfLogImp () override | |
| void | rpcStart (std::string const &method, std::uint64_t const requestId) override |
| Log start of RPC call. More... | |
| void | rpcFinish (std::string const &method, std::uint64_t const requestId) override |
| Log successful finish of RPC call. More... | |
| void | rpcError (std::string const &method, std::uint64_t const requestId) override |
| Log errored RPC call. More... | |
| void | jobQueue (JobType const type) override |
| Log queued job. More... | |
| void | jobStart (JobType const type, microseconds dur, steady_time_point startTime, int instance) override |
| Log job executing. More... | |
| void | jobFinish (JobType const type, microseconds dur, int instance) override |
| Log job finishing. More... | |
| Json::Value | countersJson () const override |
| Render performance counters in Json. More... | |
| Json::Value | currentJson () const override |
| Render currently executing jobs and RPC calls and durations in Json. More... | |
| void | resizeJobs (int const resize) override |
| Ensure enough room to store each currently executing job. More... | |
| void | rotate () override |
| Rotate perf log file. More... | |
| void | start () override |
| void | stop () override |
Private Member Functions | |
| void | openLog () |
| void | run () |
| void | report () |
| void | rpcEnd (std::string const &method, std::uint64_t const requestId, bool finish) |
Private Attributes | |
| const Setup | setup_ |
| Application & | app_ |
| const beast::Journal | j_ |
| const std::function< void()> | signalStop_ |
| Counters | counters_ {ripple::RPC::getHandlerNames(), JobTypes::instance()} |
| std::ofstream | logFile_ |
| std::thread | thread_ |
| std::mutex | mutex_ |
| std::condition_variable | cond_ |
| system_time_point | lastLog_ |
| const std::string | hostname_ {boost::asio::ip::host_name()} |
| bool | stop_ {false} |
| bool | rotate_ {false} |
Implementation class for PerfLog.
Definition at line 69 of file PerfLogImp.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| ripple::perf::PerfLogImp::PerfLogImp | ( | Setup const & | setup, |
| Application & | app, | ||
| beast::Journal | journal, | ||
| std::function< void()> && | signalStop | ||
| ) |
Definition at line 312 of file PerfLogImp.cpp.
|
override |
Definition at line 322 of file PerfLogImp.cpp.
|
private |
Definition at line 222 of file PerfLogImp.cpp.
|
private |
Definition at line 256 of file PerfLogImp.cpp.
|
private |
Definition at line 281 of file PerfLogImp.cpp.
|
private |
Definition at line 347 of file PerfLogImp.cpp.
|
overridevirtual |
Log start of RPC call.
| method | RPC command |
| requestId | Unique identifier to track command |
Implements ripple::perf::PerfLog.
Definition at line 328 of file PerfLogImp.cpp.
|
overridevirtual |
Log successful finish of RPC call.
| method | RPC command |
| requestId | Unique identifier to track command |
Implements ripple::perf::PerfLog.
Definition at line 164 of file PerfLogImp.h.
|
overridevirtual |
Log errored RPC call.
| method | RPC command |
| requestId | Unique identifier to track command |
Implements ripple::perf::PerfLog.
Definition at line 170 of file PerfLogImp.h.
|
overridevirtual |
Log queued job.
| type | Job type |
Implements ripple::perf::PerfLog.
Definition at line 382 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 ripple::perf::PerfLog.
Definition at line 395 of file PerfLogImp.cpp.
|
overridevirtual |
Log job finishing.
| type | Job type |
| dur | Duration running in microseconds |
| instance | Jobqueue worker thread instance |
Implements ripple::perf::PerfLog.
Definition at line 418 of file PerfLogImp.cpp.
|
overridevirtual |
Render performance counters in Json.
Implements ripple::perf::PerfLog.
Definition at line 187 of file PerfLogImp.h.
|
overridevirtual |
Render currently executing jobs and RPC calls and durations in Json.
Implements ripple::perf::PerfLog.
Definition at line 193 of file PerfLogImp.h.
|
overridevirtual |
Ensure enough room to store each currently executing job.
Implements ripple::perf::PerfLog.
Definition at line 437 of file PerfLogImp.cpp.
|
overridevirtual |
Rotate perf log file.
Implements ripple::perf::PerfLog.
Definition at line 445 of file PerfLogImp.cpp.
|
overridevirtual |
Reimplemented from ripple::perf::PerfLog.
Definition at line 456 of file PerfLogImp.cpp.
|
overridevirtual |
Reimplemented from ripple::perf::PerfLog.
Definition at line 463 of file PerfLogImp.cpp.
|
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.
|
private |
Definition at line 135 of file PerfLogImp.h.
|
private |
Definition at line 136 of file PerfLogImp.h.
|
private |
Definition at line 137 of file PerfLogImp.h.
1.8.17