LogCabin
|
Members that are constructed later, during enable(). More...
Public Member Functions | |
Deferred (ServerStats &serverStats) | |
Constructor. | |
Public Attributes | |
SignalHandler | signalHandler |
See SignalHandler. | |
Event::Signal::Monitor | signalMonitor |
Registers signalHandler with event loop. | |
std::chrono::nanoseconds | dumpInterval |
If nonzero, the statsDumper thread will write the current stats to the debug log if this duration has elapsed since the last dump. | |
std::thread | statsDumper |
This thread dumps the stats periodically and when signalled. |
Members that are constructed later, during enable().
Whereas the ServerStats is constructed early in the server startup process, these members get to access globals and globals.config in their constructors.
Definition at line 134 of file ServerStats.h.
LogCabin::Server::ServerStats::Deferred::Deferred | ( | ServerStats & | serverStats | ) | [explicit] |
See SignalHandler.
Definition at line 143 of file ServerStats.h.
Registers signalHandler with event loop.
Definition at line 148 of file ServerStats.h.
std::chrono::nanoseconds LogCabin::Server::ServerStats::Deferred::dumpInterval |
If nonzero, the statsDumper thread will write the current stats to the debug log if this duration has elapsed since the last dump.
Definition at line 154 of file ServerStats.h.
This thread dumps the stats periodically and when signalled.
Dumping the stats is done from a separate thread so that the event loop thread does not acquire locks in higher-level modules (which could result in deadlocks or delays). Introduced for https://github.com/logcabin/logcabin/issues/159 .
Definition at line 163 of file ServerStats.h.