This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c9ef5ef2b1 [refactor](profile) refactor join node profile when build
side shared hash table (#24785)
c9ef5ef2b1 is described below
commit c9ef5ef2b1af1069e7a2c85f67616bdaefb9ead0
Author: zhangstar333 <[email protected]>
AuthorDate: Mon Sep 25 10:28:16 2023 +0800
[refactor](profile) refactor join node profile when build side shared hash
table (#24785)
refactor join node profile when build side shared hash table
---
be/src/vec/exec/join/vhash_join_node.cpp | 10 ++++++----
be/src/vec/exec/join/vjoin_node_base.cpp | 3 ---
be/src/vec/exec/join/vnested_loop_join_node.cpp | 3 +++
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/be/src/vec/exec/join/vhash_join_node.cpp
b/be/src/vec/exec/join/vhash_join_node.cpp
index 1c421f04d1..1f351f3294 100644
--- a/be/src/vec/exec/join/vhash_join_node.cpp
+++ b/be/src/vec/exec/join/vhash_join_node.cpp
@@ -335,9 +335,12 @@ Status HashJoinNode::prepare(RuntimeState* state) {
// Build phase
auto record_profile = _should_build_hash_table ? _build_phase_profile :
faker_runtime_profile();
- _build_table_timer = ADD_CHILD_TIMER(_build_phase_profile,
"BuildTableTime", "BuildTime");
+ _build_get_next_timer = ADD_TIMER(record_profile, "BuildGetNextTime");
+ _build_timer = ADD_TIMER(record_profile, "BuildTime");
+ _build_rows_counter = ADD_COUNTER(record_profile, "BuildRows",
TUnit::UNIT);
+ _build_table_timer = ADD_CHILD_TIMER(record_profile, "BuildTableTime",
"BuildTime");
_build_side_merge_block_timer =
- ADD_CHILD_TIMER(_build_phase_profile, "BuildSideMergeBlockTime",
"BuildTime");
+ ADD_CHILD_TIMER(record_profile, "BuildSideMergeBlockTime",
"BuildTime");
_build_table_insert_timer = ADD_TIMER(record_profile,
"BuildTableInsertTime");
_build_expr_call_timer = ADD_TIMER(record_profile, "BuildExprCallTime");
_build_table_expanse_timer = ADD_TIMER(record_profile,
"BuildTableExpanseTime");
@@ -935,8 +938,7 @@ Status HashJoinNode::sink(doris::RuntimeState* state,
vectorized::Block* in_bloc
} else if (!_should_build_hash_table) {
DCHECK(_shared_hashtable_controller != nullptr);
DCHECK(_shared_hash_table_context != nullptr);
- auto wait_timer =
- ADD_CHILD_TIMER(_build_phase_profile,
"WaitForSharedHashTableTime", "BuildTime");
+ auto wait_timer = ADD_TIMER(_build_phase_profile,
"WaitForSharedHashTableTime");
SCOPED_TIMER(wait_timer);
RETURN_IF_ERROR(
_shared_hashtable_controller->wait_for_signal(state,
_shared_hash_table_context));
diff --git a/be/src/vec/exec/join/vjoin_node_base.cpp
b/be/src/vec/exec/join/vjoin_node_base.cpp
index 7c6ac27ca0..62c6dd1685 100644
--- a/be/src/vec/exec/join/vjoin_node_base.cpp
+++ b/be/src/vec/exec/join/vjoin_node_base.cpp
@@ -110,9 +110,6 @@ Status VJoinNodeBase::prepare(RuntimeState* state) {
RETURN_IF_ERROR(ExecNode::prepare(state));
runtime_profile()->add_info_string("JoinType", to_string(_join_op));
_build_phase_profile = runtime_profile()->create_child("BuildPhase", true,
true);
- _build_get_next_timer = ADD_TIMER(_build_phase_profile,
"BuildGetNextTime");
- _build_timer = ADD_TIMER(_build_phase_profile, "BuildTime");
- _build_rows_counter = ADD_COUNTER(_build_phase_profile, "BuildRows",
TUnit::UNIT);
_probe_phase_profile = runtime_profile()->create_child("ProbePhase", true,
true);
_probe_timer = ADD_TIMER(_probe_phase_profile, "ProbeTime");
diff --git a/be/src/vec/exec/join/vnested_loop_join_node.cpp
b/be/src/vec/exec/join/vnested_loop_join_node.cpp
index 8e5175664c..3bf7d2ff54 100644
--- a/be/src/vec/exec/join/vnested_loop_join_node.cpp
+++ b/be/src/vec/exec/join/vnested_loop_join_node.cpp
@@ -133,6 +133,9 @@ Status VNestedLoopJoinNode::init(const TPlanNode& tnode,
RuntimeState* state) {
Status VNestedLoopJoinNode::prepare(RuntimeState* state) {
SCOPED_TIMER(_runtime_profile->total_time_counter());
RETURN_IF_ERROR(VJoinNodeBase::prepare(state));
+ _build_get_next_timer = ADD_TIMER(_build_phase_profile,
"BuildGetNextTime");
+ _build_timer = ADD_TIMER(_build_phase_profile, "BuildTime");
+ _build_rows_counter = ADD_COUNTER(_build_phase_profile, "BuildRows",
TUnit::UNIT);
// pre-compute the tuple index of build tuples in the output row
int num_build_tuples = child(1)->row_desc().tuple_descriptors().size();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]