transfer the query response time collection to sql audit consumer thread
This commit is contained in:

committed by
wangzelin.wzl

parent
18b5b5be8b
commit
727c5bf512
@ -30,6 +30,7 @@
|
|||||||
#include "sql/plan_cache/ob_plan_cache_callback.h"
|
#include "sql/plan_cache/ob_plan_cache_callback.h"
|
||||||
#include "sql/plan_cache/ob_plan_cache_value.h"
|
#include "sql/plan_cache/ob_plan_cache_value.h"
|
||||||
#include "sql/session/ob_basic_session_info.h"
|
#include "sql/session/ob_basic_session_info.h"
|
||||||
|
#include "observer/mysql/ob_query_response_time.h"
|
||||||
|
|
||||||
namespace oceanbase {
|
namespace oceanbase {
|
||||||
using namespace oceanbase::share::schema;
|
using namespace oceanbase::share::schema;
|
||||||
@ -198,6 +199,9 @@ int ObMySQLRequestManager::record_request(const ObAuditRecordData& audit_record,
|
|||||||
audit_record.exec_timestamp_.receive_ts_);
|
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
|
// push into queue
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
int64_t req_id = 0;
|
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/ob_sql_define.h"
|
||||||
#include "sql/plan_cache/ob_plan_cache_util.h"
|
#include "sql/plan_cache/ob_plan_cache_util.h"
|
||||||
#include "observer/virtual_table/ob_information_query_response_time.h"
|
#include "observer/virtual_table/ob_information_query_response_time.h"
|
||||||
#include "observer/mysql/ob_query_response_time.h"
|
|
||||||
namespace oceanbase {
|
namespace oceanbase {
|
||||||
namespace sql {
|
namespace sql {
|
||||||
struct ObExecRecord {
|
struct ObExecRecord {
|
||||||
@ -343,7 +342,6 @@ struct ObAuditRecordData {
|
|||||||
EVENT_ADD(SYS_TIME_MODEL_DB_TIME, elapsed_time);
|
EVENT_ADD(SYS_TIME_MODEL_DB_TIME, elapsed_time);
|
||||||
EVENT_ADD(SYS_TIME_MODEL_DB_CPU, cpu_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
|
bool is_timeout() const
|
||||||
|
Reference in New Issue
Block a user