Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some logs about concurrency #8214

Merged
merged 4 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbms/src/Flash/Executor/PipelineExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void PipelineExecutor::cancel()
String PipelineExecutor::toString() const
{
assert(root_pipeline);
return root_pipeline->toTreeString();
return fmt::format("query concurrency: {}\n{}", context.getMaxStreams(), root_pipeline->toTreeString());
}

int PipelineExecutor::estimateNewThreadCount()
Expand Down
1 change: 1 addition & 0 deletions dbms/src/Flash/Statistics/BaseRuntimeStatistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#pragma once

#include <Common/FmtUtils.h>
#include <common/types.h>

namespace DB
Expand Down
3 changes: 2 additions & 1 deletion dbms/src/Flash/Statistics/ExecutorStatistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ class ExecutorStatistics : public ExecutorStatisticsBase
[](const String & child, FmtBuffer & bf) { bf.fmtAppend(R"("{}")", child); },
",");
fmt_buffer.fmtAppend(
R"(],"outbound_rows":{},"outbound_blocks":{},"outbound_bytes":{},"outbound_allocated_bytes":{},"execution_time_ns":{})",
R"(],"outbound_rows":{},"outbound_blocks":{},"outbound_bytes":{},"outbound_allocated_bytes":{},"concurrency":{},"execution_time_ns":{})",
base.rows,
base.blocks,
base.bytes,
base.allocated_bytes,
base.concurrency,
base.execution_time_ns);
if constexpr (ExecutorImpl::has_extra_info)
{
Expand Down
6 changes: 4 additions & 2 deletions dbms/src/Flash/Statistics/JoinImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ namespace DB
void JoinStatistics::appendExtraJson(FmtBuffer & fmt_buffer) const
{
fmt_buffer.fmtAppend(
R"("peak_build_bytes_usage":{},"build_side_child":"{}","is_spill_enabled":{},"is_spilled":{})"
R"("join_build_inbound_rows":{},"join_build_inbound_blocks":{},"join_build_inbound_bytes":{},"join_build_inbound_allocated_bytes":{}, "join_build_execution_time_ns":{})",
R"("peak_build_bytes_usage":{},"build_side_child":"{}","is_spill_enabled":{},"is_spilled":{},)"
R"("join_build_inbound_rows":{},"join_build_inbound_blocks":{},"join_build_inbound_bytes":{},)"
R"("join_build_inbound_allocated_bytes":{},"join_build_concurrency":{},"join_build_execution_time_ns":{})",
peak_build_bytes_usage,
build_side_child,
is_spill_enabled,
Expand All @@ -30,6 +31,7 @@ void JoinStatistics::appendExtraJson(FmtBuffer & fmt_buffer) const
join_build_base.blocks,
join_build_base.bytes,
join_build_base.allocated_bytes,
join_build_base.concurrency,
join_build_base.execution_time_ns);
}

Expand Down
Loading