提交 727c5bf5 编写于 作者: L LINxiansheng 提交者: wangzelin.wzl

transfer the query response time collection to sql audit consumer thread

上级 18b5b5be
......@@ -30,6 +30,7 @@
#include "sql/plan_cache/ob_plan_cache_callback.h"
#include "sql/plan_cache/ob_plan_cache_value.h"
#include "sql/session/ob_basic_session_info.h"
#include "observer/mysql/ob_query_response_time.h"
namespace oceanbase {
using namespace oceanbase::share::schema;
......@@ -198,6 +199,9 @@ int ObMySQLRequestManager::record_request(const ObAuditRecordData& audit_record,
audit_record.exec_timestamp_.receive_ts_);
}
// query response time
observer::ObRSTCollector::get_instance().collect_query_response_time(audit_record.tenant_id_,audit_record.get_elapsed_time());
// push into queue
if (OB_SUCC(ret)) {
int64_t req_id = 0;
......
......@@ -57,7 +57,6 @@ EVENT_INFO(FUSE_ROW_CACHE_MISS, fuse_row_cache_miss)
#include "sql/ob_sql_define.h"
#include "sql/plan_cache/ob_plan_cache_util.h"
#include "observer/virtual_table/ob_information_query_response_time.h"
#include "observer/mysql/ob_query_response_time.h"
namespace oceanbase {
namespace sql {
struct ObExecRecord {
......@@ -343,7 +342,6 @@ struct ObAuditRecordData {
EVENT_ADD(SYS_TIME_MODEL_DB_TIME, elapsed_time);
EVENT_ADD(SYS_TIME_MODEL_DB_CPU, cpu_time);
}
observer::ObRSTCollector::get_instance().collect_query_response_time(tenant_id_,elapsed_time);
}
bool is_timeout() const
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册