Fix query average measurment and average text output.

The query_ended() call was not in the right spot. Tests did not
detect it. Changed textual output to reflect the fact that they
are for RWSplit reads.
This commit is contained in:
Niclas Antti
2018-11-02 13:03:20 +02:00
parent 84d45447fc
commit f8c132903b
3 changed files with 16 additions and 14 deletions

View File

@ -571,7 +571,7 @@ void dprintServer(DCB* dcb, const SERVER* srv)
{
ave_os << "not available";
}
dcb_printf(dcb, "\tAverage response time: %s\n", ave_os.str().c_str());
dcb_printf(dcb, "\tAdaptive avg. select time: %s\n", ave_os.str().c_str());
if (server->persistpoolmax)
{
@ -1448,6 +1448,9 @@ static json_t* server_json_attributes(const SERVER* server)
json_object_set_new(stats, "active_operations", json_integer(server->stats.n_current_ops));
json_object_set_new(stats, "routed_packets", json_integer(server->stats.packets));
maxbase::Duration response_ave(server_response_time_average(server));
json_object_set_new(stats, "adaptive_avg_select_time", json_string(to_string(response_ave).c_str()));
json_object_set_new(attr, "statistics", stats);
return attr;