dodo
0.0.1
A C++ library to create containerized Linux services
|
Updates the attribute now_ in the TCPListener at a regular interval to avoid excessive number of calls to gettimeofday in the TCPListener event loop where time high time precision is of lesser importance. More...
Public Member Functions | |
TCPListenerTimer (TCPListener &listener) | |
Constructor, specify the TCPListener to operate on. More... | |
virtual void | run () |
Decsendants must override the run function. More... | |
void | stop () |
Stop the timer. More... | |
![]() | |
Thread () | |
Constructor. More... | |
virtual | ~Thread () |
Destructor. More... | |
double | getAvgBlkInRate () |
Get the average block in rate since thread start() More... | |
double | getAvgBlkOutRate () |
Get the average block out rate since thread start() More... | |
double | getAvgICtx () |
Get the average involuntary context switch rate since thread start() More... | |
double | getAvgMajFltRate () |
Get the average major fault rate since thread start() More... | |
double | getAvgMinFltRate () |
Get the average minor fault rate since thread start() More... | |
double | getAvgSysCPU () |
Get the average system mode cpu (cpu seconds/second) since thread start() More... | |
double | getAvgUserCPU () |
Get the average user mode cpu (cpu seconds/second) since thread start() More... | |
double | getAvgVCtx () |
Get the average voluntary context switch rate since thread start() More... | |
std::thread::id | getId () const |
Get the thread id. More... | |
double | getLastBlkInRate () |
Get last block in rate since last sample. More... | |
double | getLastBlkOutRate () |
Get last block out rate since last sample. More... | |
double | getLastICtx () |
Get involuntary context switch rate since last sample. More... | |
double | getLastMajFltRate () |
Get the major fault rate since last sample. More... | |
double | getLastMinFltRate () |
Get the minor fault rate since last sample. More... | |
double | getLastSysCPU () |
Get the system mode cpu (cpu seconds/second) since last sample. More... | |
double | getLastUserCPU () |
Get the user mode cpu (cpu seconds/second) since last sample. More... | |
double | getLastVCtx () |
Get voluntary context switch rate since last sample. More... | |
long | getMaxRSS () |
Get the maximum resident set size seen on the thread. More... | |
double | getRunTime () |
Time, in seconds, since thread start. More... | |
double | getSnapDiffTime () |
Time, in seconds, since last statistic update. More... | |
pid_t | getTID () const |
Return the tid. More... | |
void | snapRUsage () |
Take a snapshot of the thread's resource usage. More... | |
void | start () |
Start the thread. More... | |
void | wait () |
Wait for the thread to join the current thread / wait for the thread to finish. More... | |
Protected Attributes | |
TCPListener & | listener_ |
The associated TCPListener. More... | |
bool | stopped_ |
True if stop() was called. More... | |
![]() | |
struct rusage | prev_rusage_ |
Previous statistics. More... | |
struct timeval | prev_snap_time_ |
Time of previous statistics snapshot. More... | |
struct rusage | rusage_ |
Last statistics. More... | |
struct timeval | snap_time_ |
Time of last statistics snapshot. More... | |
struct timeval | start_time_ |
Time Thread started. More... | |
std::thread * | thread_ |
The std::tread object. More... | |
Additional Inherited Members |
Updates the attribute now_ in the TCPListener at a regular interval to avoid excessive number of calls to gettimeofday in the TCPListener event loop where time high time precision is of lesser importance.
Definition at line 70 of file tcplistener.cpp.
|
inlineexplicit |
Constructor, specify the TCPListener to operate on.
listener | the TCPListener to operate on. |
Definition at line 76 of file tcplistener.cpp.
|
inlinevirtual |
Decsendants must override the run function.
Implements dodo::threads::Thread.
Definition at line 83 of file tcplistener.cpp.
|
inline |
Stop the timer.
Definition at line 96 of file tcplistener.cpp.
|
protected |
The associated TCPListener.
Definition at line 101 of file tcplistener.cpp.
|
protected |
True if stop() was called.
Definition at line 103 of file tcplistener.cpp.