[CP] record spm stats after plan execution even enable_perf_event parameter is disabled
This commit is contained in:
@ -491,6 +491,15 @@ void ObPhysicalPlan::update_plan_stat(const ObAuditRecordData &record,
|
||||
} else {
|
||||
ATOMIC_INC(&(stat_.hit_count_));
|
||||
}
|
||||
if (ATOMIC_LOAD(&stat_.is_evolution_)) { //for spm
|
||||
ATOMIC_INC(&(stat_.evolution_stat_.executions_));
|
||||
// ATOMIC_AAF(&(stat_.evolution_stat_.cpu_time_),
|
||||
// record.get_elapsed_time() - record.exec_record_.wait_time_end_
|
||||
// - (record.exec_timestamp_.run_ts_ - record.exec_timestamp_.receive_ts_));
|
||||
ATOMIC_AAF(&(stat_.evolution_stat_.cpu_time_), record.exec_timestamp_.executor_t_);
|
||||
ATOMIC_AAF(&(stat_.evolution_stat_.elapsed_time_), record.get_elapsed_time());
|
||||
ATOMIC_STORE(&(stat_.evolution_stat_.last_exec_ts_), record.exec_timestamp_.executor_end_ts_);
|
||||
}
|
||||
} else { // long route stat begin
|
||||
execute_count = ATOMIC_AAF(&stat_.execute_times_, 1);
|
||||
ATOMIC_AAF(&(stat_.total_process_time_), record.get_process_time());
|
||||
|
||||
Reference in New Issue
Block a user