MXS-1777 Make "Sample Max" of the server EMAverage adaptive

A rather simple but very effective method as testing shows.
This commit is contained in:
Niclas Antti
2018-10-03 19:05:31 +03:00
parent 19f8e1697b
commit e56492c23f
2 changed files with 34 additions and 8 deletions

View File

@ -47,18 +47,11 @@ public:
return m_response_time.average();
}
void response_time_add(double ave, int num_samples)
{
m_response_time.add(ave, num_samples);
}
void response_time_add(double ave, int num_samples);
mutable std::mutex m_lock;
private:
// nantti, TODO. Decide whether to expose some of this in config, or if the values
// can be calculated at runtime. The "500" or sample_max affects how often a
// session should updates this stat. sample_max should be slightly lower than max sample
// rate (which is less than qps due to the noise filter).
maxbase::EMAverage m_response_time;
};