MXS-1992 RoutingWorker provides access to QC stats

This will be used in the context of MaxAdmin and MaxCtrl.
This commit is contained in:
Johan Wikman
2018-08-02 15:54:07 +03:00
parent c302268ca3
commit b76cdc944b
2 changed files with 38 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include <unordered_map>
#include <maxscale/query_classifier.h>
#include <maxscale/routingworker.h>
#include <maxscale/worker.hh>
@ -354,6 +355,13 @@ public:
}
}
/**
* Provides QC statistics of all workers
*
* @param all_stats Vector that on return will contain the statistics of all workers.
*/
static void get_all_qc_stats(std::vector<QC_CACHE_STATS>& all_stats);
private:
const int m_id; /*< The id of the worker. */
SessionsById m_sessions; /*< A mapping of session_id->MXS_SESSION. The map