Track the number of performed monitoring intervals
Tracking how many times the monitor has performed its monitoring allows the test framework to consistently wait for an event instead of waiting for a hard-coded time period. The MaxCtrl `api get` command can be used to easily extract the numeric value.
This commit is contained in:
@ -123,6 +123,7 @@ monitorMain(void *arg)
|
||||
|
||||
while (!handle->shutdown)
|
||||
{
|
||||
atomic_add_uint64(&monitor->ticks, 1);
|
||||
lock_monitor_servers(monitor);
|
||||
servers_status_pending_to_current(monitor);
|
||||
|
||||
|
@ -545,6 +545,7 @@ monitorMain(void *arg)
|
||||
/* reset cluster members counter */
|
||||
is_cluster = 0;
|
||||
|
||||
atomic_add_uint64(&mon->ticks, 1);
|
||||
lock_monitor_servers(mon);
|
||||
servers_status_pending_to_current(mon);
|
||||
|
||||
|
@ -270,6 +270,7 @@ void GRMon::main()
|
||||
|
||||
while (!m_shutdown)
|
||||
{
|
||||
atomic_add_uint64(&m_monitor->ticks, 1);
|
||||
lock_monitor_servers(m_monitor);
|
||||
servers_status_pending_to_current(m_monitor);
|
||||
|
||||
|
@ -2204,6 +2204,7 @@ monitorMain(void *arg)
|
||||
/* reset num_servers */
|
||||
num_servers = 0;
|
||||
|
||||
atomic_add_uint64(&mon->ticks, 1);
|
||||
lock_monitor_servers(mon);
|
||||
servers_status_pending_to_current(mon);
|
||||
|
||||
|
@ -543,6 +543,7 @@ monitorMain(void *arg)
|
||||
}
|
||||
nrounds += 1;
|
||||
|
||||
atomic_add_uint64(&mon->ticks, 1);
|
||||
lock_monitor_servers(mon);
|
||||
servers_status_pending_to_current(mon);
|
||||
|
||||
|
@ -347,6 +347,7 @@ monitorMain(void *arg)
|
||||
}
|
||||
nrounds += 1;
|
||||
|
||||
atomic_add_uint64(&mon->ticks, 1);
|
||||
lock_monitor_servers(mon);
|
||||
servers_status_pending_to_current(mon);
|
||||
|
||||
|
Reference in New Issue
Block a user