LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
LogCabin::Server::ServerStats::Deferred Struct Reference

Members that are constructed later, during enable(). More...

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

Constructor.

Called during enable().

Definition at line 73 of file ServerStats.cc.


Member Data Documentation

See SignalHandler.

Definition at line 143 of file ServerStats.h.

Registers signalHandler with event loop.

Definition at line 148 of file ServerStats.h.

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.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines