MXS-1674 Change load granularity to 1 second
With a granularity of 1 second, the load will from a human perspective reflect the current situation. That also means that the maxadmin output shows "natural" steps; 1s, 1m and 1h.
This commit is contained in:
@ -240,8 +240,8 @@ dShowThreads(DCB *dcb)
|
||||
{
|
||||
dcb_printf(dcb, "Polling Threads.\n\n");
|
||||
|
||||
dcb_printf(dcb, " ID | State | #descriptors (curr) | #descriptors (tot) | Load (10s) | Load (1m) | Load (1h) |\n");
|
||||
dcb_printf(dcb, "----+------------+---------------------+---------------------+------------+-----------+-----------+\n");
|
||||
dcb_printf(dcb, " ID | State | #descriptors (curr) | #descriptors (tot) | Load (1s) | Load (1m) | Load (1h) |\n");
|
||||
dcb_printf(dcb, "----+------------+---------------------+---------------------+-----------+-----------+-----------+\n");
|
||||
for (int i = 0; i < n_threads; i++)
|
||||
{
|
||||
Worker* worker = Worker::get(i);
|
||||
@ -276,9 +276,9 @@ dShowThreads(DCB *dcb)
|
||||
|
||||
worker->get_descriptor_counts(&nCurrent, &nTotal);
|
||||
|
||||
dcb_printf(dcb, " %2d | %10s | %19" PRIu32 " | %19" PRIu64 " | %10d | %9d | %9d |\n",
|
||||
dcb_printf(dcb, " %2d | %10s | %19" PRIu32 " | %19" PRIu64 " | %9d | %9d | %9d |\n",
|
||||
i, state, nCurrent, nTotal,
|
||||
worker->load(Worker::Load::TEN_SECONDS),
|
||||
worker->load(Worker::Load::ONE_SECOND),
|
||||
worker->load(Worker::Load::ONE_MINUTE),
|
||||
worker->load(Worker::Load::ONE_HOUR));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user