[feature](profile) add process hashtable time in join node (#21878)

add process hashtable time in join node
This commit is contained in:
Mryange
2023-07-18 18:09:42 +08:00
committed by GitHub
parent 3089e4b3b6
commit c36d225a27
4 changed files with 7 additions and 2 deletions

View File

@ -105,7 +105,7 @@ struct ProcessHashTableProbe {
RuntimeProfile::Counter* _search_hashtable_timer;
RuntimeProfile::Counter* _build_side_output_timer;
RuntimeProfile::Counter* _probe_side_output_timer;
RuntimeProfile::Counter* _probe_process_hashtable_timer;
static constexpr int PROBE_SIDE_EXPLODE_RATE = 3;
};

View File

@ -47,7 +47,8 @@ ProcessHashTableProbe<JoinOpType>::ProcessHashTableProbe(HashJoinNode* join_node
_rows_returned_counter(join_node->_rows_returned_counter),
_search_hashtable_timer(join_node->_search_hashtable_timer),
_build_side_output_timer(join_node->_build_side_output_timer),
_probe_side_output_timer(join_node->_probe_side_output_timer) {}
_probe_side_output_timer(join_node->_probe_side_output_timer),
_probe_process_hashtable_timer(join_node->_probe_process_hashtable_timer) {}
template <int JoinOpType>
template <bool have_other_join_conjunct>
@ -1070,6 +1071,7 @@ Status ProcessHashTableProbe<JoinOpType>::process_data_in_hashtable(HashTableTyp
Block* output_block,
bool* eos) {
using Mapped = typename HashTableType::Mapped;
SCOPED_TIMER(_probe_process_hashtable_timer);
if constexpr (std::is_same_v<Mapped, RowRefListWithFlag> ||
std::is_same_v<Mapped, RowRefListWithFlags>) {
hash_table_ctx.init_once();

View File

@ -471,6 +471,8 @@ Status HashJoinNode::prepare(RuntimeState* state) {
ADD_CHILD_TIMER(probe_phase_profile, "ProbeWhenBuildSideOutputTime", "ProbeTime");
_probe_side_output_timer =
ADD_CHILD_TIMER(probe_phase_profile, "ProbeWhenProbeSideOutputTime", "ProbeTime");
_probe_process_hashtable_timer =
ADD_CHILD_TIMER(probe_phase_profile, "ProbeWhenProcessHashTableTime", "ProbeTime");
_open_timer = ADD_TIMER(runtime_profile(), "OpenTime");
_allocate_resource_timer = ADD_TIMER(runtime_profile(), "AllocateResourceTime");
_process_other_join_conjunct_timer = ADD_TIMER(runtime_profile(), "OtherJoinConjunctTime");

View File

@ -304,6 +304,7 @@ private:
RuntimeProfile::Counter* _search_hashtable_timer;
RuntimeProfile::Counter* _build_side_output_timer;
RuntimeProfile::Counter* _probe_side_output_timer;
RuntimeProfile::Counter* _probe_process_hashtable_timer;
RuntimeProfile::Counter* _build_side_compute_hash_timer;
RuntimeProfile::Counter* _build_side_merge_block_timer;
RuntimeProfile::Counter* _build_runtime_filter_timer;