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.
This commit is contained in:
Johan Wikman 2018-11-05 11:31:20 +02:00
parent c67c27742a
commit 6dc038aa4e
3 changed files with 0 additions and 10 deletions

View File

@ -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<int64_t, MAXNFDS> n_fds {}; /*< Number of wakeups with particular n_fds value */

View File

@ -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);

View File

@ -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));