MXS-1823 Replace meaningless eventq info with meaningful
The evq_length file held the returned number of descriptors from the last epoll_wait() call. As such it is highly temporal and not particularly meaningful. That has now been removed and the instead the average number of returned descriptors is maintained. That information changes slowly and thus carries some meaning.
This commit is contained in:
@ -689,6 +689,9 @@ void Worker::poll_waitevents()
|
||||
|
||||
m_load.reset();
|
||||
|
||||
int64_t nFds_total = 0;
|
||||
int64_t nPolls_effective = 0;
|
||||
|
||||
while (!should_shutdown())
|
||||
{
|
||||
int nfds;
|
||||
@ -724,7 +727,18 @@ void Worker::poll_waitevents()
|
||||
|
||||
if (nfds > 0)
|
||||
{
|
||||
m_statistics.evq_length = nfds;
|
||||
nPolls_effective += 1;
|
||||
nFds_total += nfds;
|
||||
|
||||
if (nFds_total <= 0)
|
||||
{
|
||||
// Wrapped, so we reset the situation.
|
||||
nFds_total = nfds;
|
||||
nPolls_effective = 1;
|
||||
}
|
||||
|
||||
m_statistics.evq_avg = nFds_total / nPolls_effective;
|
||||
|
||||
if (nfds > m_statistics.evq_max)
|
||||
{
|
||||
m_statistics.evq_max = nfds;
|
||||
|
Reference in New Issue
Block a user