MXS-2078 Add support for holding router specific server data.

New class to hold the statistics, part of which is currently in
RWSplitSession. Simple API in Backend to create session
specific data.
This commit is contained in:
Niclas Antti
2018-11-05 13:59:14 +02:00
parent 13a0390de6
commit 5175d2b2d7
4 changed files with 155 additions and 0 deletions

View File

@ -259,3 +259,29 @@ bool Backend::write_stored_command()
return rval;
}
const maxbase::StopWatch& Backend::session_timer() const
{
return m_session_timer;
}
const maxbase::IntervalTimer& Backend::select_timer() const
{
return m_select_timer;
}
void Backend::select_started()
{
m_select_timer.start_interval();
}
void Backend::select_ended()
{
m_select_timer.end_interval();
++m_num_selects;
}
int64_t Backend::num_selects() const
{
return m_num_selects;
}