From 6dc038aa4e72fb48cd920f28d0779054f01a0fc6 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 5 Nov 2018 11:31:20 +0200 Subject: [PATCH] MXS-2137 Remove meaningsless statistics The removed statistics variables have no meaning anymore and were not updated. Decided to simply drop the variable from the JSON output. It gets far too rigid if fields of objects cannot be changed without bumping the REST-API version. --- maxutils/maxbase/include/maxbase/worker.hh | 3 --- server/core/poll.cc | 2 -- server/core/routingworker.cc | 5 ----- 3 files changed, 10 deletions(-) diff --git a/maxutils/maxbase/include/maxbase/worker.hh b/maxutils/maxbase/include/maxbase/worker.hh index 9157a7885..6669f3f0e 100644 --- a/maxutils/maxbase/include/maxbase/worker.hh +++ b/maxutils/maxbase/include/maxbase/worker.hh @@ -48,11 +48,8 @@ struct WORKER_STATISTICS int64_t n_accept = 0; /*< Number of accept events */ int64_t n_polls = 0; /*< Number of poll cycles */ int64_t n_pollev = 0; /*< Number of polls returning events */ - int64_t n_nbpollev = 0; /*< Number of polls returning events */ int64_t evq_avg = 0; /*< Average event queue length */ int64_t evq_max = 0; /*< Maximum event queue length */ - int64_t blockingpolls = 0; /*< Number of epoll_waits with a timeout - * specified */ int64_t maxqtime = 0; int64_t maxexectime = 0; std::array n_fds {}; /*< Number of wakeups with particular n_fds value */ diff --git a/server/core/poll.cc b/server/core/poll.cc index 92b47eb86..2929456da 100644 --- a/server/core/poll.cc +++ b/server/core/poll.cc @@ -104,9 +104,7 @@ void dprintPollStats(DCB* dcb) dcb_printf(dcb, "\nPoll Statistics.\n\n"); dcb_printf(dcb, "No. of epoll cycles: %" PRId64 "\n", s.n_polls); - dcb_printf(dcb, "No. of epoll cycles with wait: %" PRId64 "\n", s.blockingpolls); dcb_printf(dcb, "No. of epoll calls returning events: %" PRId64 "\n", s.n_pollev); - dcb_printf(dcb, "No. of non-blocking calls returning events: %" PRId64 "\n", s.n_nbpollev); dcb_printf(dcb, "No. of read events: %" PRId64 "\n", s.n_read); dcb_printf(dcb, "No. of write events: %" PRId64 "\n", s.n_write); dcb_printf(dcb, "No. of error events: %" PRId64 "\n", s.n_error); diff --git a/server/core/routingworker.cc b/server/core/routingworker.cc index 4af207c53..17ff7add0 100644 --- a/server/core/routingworker.cc +++ b/server/core/routingworker.cc @@ -759,10 +759,8 @@ Worker::STATISTICS RoutingWorker::get_statistics() cs.n_accept = mxs::sum(s, &STATISTICS::n_accept); cs.n_polls = mxs::sum(s, &STATISTICS::n_polls); cs.n_pollev = mxs::sum(s, &STATISTICS::n_pollev); - cs.n_nbpollev = mxs::sum(s, &STATISTICS::n_nbpollev); cs.evq_avg = mxs::avg(s, &STATISTICS::evq_avg); cs.evq_max = mxs::max(s, &STATISTICS::evq_max); - cs.blockingpolls = mxs::sum(s, &STATISTICS::blockingpolls); cs.maxqtime = mxs::max(s, &STATISTICS::maxqtime); cs.maxexectime = mxs::max(s, &STATISTICS::maxexectime); cs.n_fds = mxs::sum_element(s, &STATISTICS::n_fds); @@ -1033,9 +1031,6 @@ public: json_object_set_new(pStats, "errors", json_integer(s.n_error)); json_object_set_new(pStats, "hangups", json_integer(s.n_hup)); json_object_set_new(pStats, "accepts", json_integer(s.n_accept)); - json_object_set_new(pStats, "blocking_polls", json_integer(s.blockingpolls)); - // TODO: When REST-API v2 is published, remove 'event_queue_length'. - json_object_set_new(pStats, "event_queue_length", json_integer(s.evq_avg)); json_object_set_new(pStats, "avg_event_queue_length", json_integer(s.evq_avg)); json_object_set_new(pStats, "max_event_queue_length", json_integer(s.evq_max)); json_object_set_new(pStats, "max_exec_time", json_integer(s.maxexectime));