Skip to content

Commit 4a69e43

Browse files
authored
Fix FQ Ingress + Input Rows hint (#14822)
1 parent 4d7998d commit 4a69e43

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ydb/public/lib/ydb_cli/common/plan2svg.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ void TPlan::LoadStage(std::shared_ptr<TStage> stage, const NJson::TJsonValue& no
10111011
ythrow yexception() << "Plan stage already has Ingress [" << stage->IngressName << "]";
10121012
}
10131013
stage->IngressName = subNodeType;
1014+
stage->BuiltInIngress = true;
10141015

10151016
const NJson::TJsonValue* ingressRowsNode = nullptr;
10161017
if (stage->StatsNode) {
@@ -1185,7 +1186,7 @@ void TPlan::MarkStageIndent(ui32 indent, ui32& offsetY, std::shared_ptr<TStage>
11851186

11861187
stage->OffsetY = offsetY;
11871188
ui32 height = std::max<ui32>(
1188-
(stage->Connections.size() + 3) * (INTERNAL_HEIGHT + INTERNAL_GAP_Y) + INTERNAL_GAP_Y,
1189+
(3 /* Output, MEM, CPU*/ + stage->Connections.size() + stage->BuiltInIngress) * (INTERNAL_HEIGHT + INTERNAL_GAP_Y) + INTERNAL_GAP_Y,
11891190
stage->Operators.size() * (INTERNAL_TEXT_HEIGHT + INTERNAL_GAP_Y) * 2 - INTERNAL_GAP_Y + (INTERNAL_HEIGHT - INTERNAL_TEXT_HEIGHT));
11901191

11911192
stage->Height = height;
@@ -1591,7 +1592,7 @@ void TPlan::PrintSvg(ui64 maxTime, ui32& offsetY, TStringBuilder& background, TS
15911592
if (d) {
15921593
title << " " << FormatBytes(s->OutputBytes->Details.Sum * 1000 / d) << "/s";
15931594
if (s->OutputRows) {
1594-
title << ", Rows " << FormatIntegerValue(s->OutputRows->Details.Sum * 1000 / d) << "/s";
1595+
title << ", Rows " << FormatInteger(s->OutputRows->Details.Sum * 1000 / d) << "/s";
15951596
}
15961597
}
15971598
PrintTimeline(background, canvas, title, s->OutputBytes->FirstMessage, s->OutputBytes->LastMessage, px, y0, pw, INTERNAL_HEIGHT, Config.Palette.OutputMedium);
@@ -1796,7 +1797,7 @@ void TPlan::PrintSvg(ui64 maxTime, ui32& offsetY, TStringBuilder& background, TS
17961797
if (d) {
17971798
title << " " << FormatBytes(c->CteOutputBytes->Details.Sum * 1000 / d) << "/s";
17981799
if (c->CteOutputRows) {
1799-
title << ", Rows " << FormatIntegerValue(c->CteOutputRows->Details.Sum * 1000 / d) << "/s";
1800+
title << ", Rows " << FormatInteger(c->CteOutputRows->Details.Sum * 1000 / d) << "/s";
18001801
}
18011802
}
18021803
PrintTimeline(background, canvas, title, c->CteOutputBytes->FirstMessage, c->CteOutputBytes->LastMessage, px, y + INTERNAL_GAP_Y, pw, INTERNAL_HEIGHT, Config.Palette.OutputMedium);
@@ -1870,7 +1871,7 @@ void TPlan::PrintSvg(ui64 maxTime, ui32& offsetY, TStringBuilder& background, TS
18701871
TStringBuilder tooltip;
18711872
auto textSum = FormatTooltip(tooltip, "Input", c->InputBytes.get(), FormatBytes);
18721873
if (c->InputRows) {
1873-
FormatTooltip(tooltip, ", Rows", c->InputBytes.get(), FormatInteger);
1874+
FormatTooltip(tooltip, ", Rows", c->InputRows.get(), FormatInteger);
18741875
if (c->InputRows->Details.Sum) {
18751876
tooltip << ", Width " << FormatBytes(c->InputBytes->Details.Sum / c->InputRows->Details.Sum);
18761877
}
@@ -1883,7 +1884,7 @@ void TPlan::PrintSvg(ui64 maxTime, ui32& offsetY, TStringBuilder& background, TS
18831884
if (d) {
18841885
title << " " << FormatBytes(c->InputBytes->Details.Sum * 1000 / d) << "/s";
18851886
if (c->InputRows) {
1886-
title << ", Rows " << FormatIntegerValue(c->InputRows->Details.Sum * 1000 / d) << "/s";
1887+
title << ", Rows " << FormatInteger(c->InputRows->Details.Sum * 1000 / d) << "/s";
18871888
}
18881889
}
18891890
PrintTimeline(background, canvas, title, c->InputBytes->FirstMessage, c->InputBytes->LastMessage, px, y0, pw, INTERNAL_HEIGHT, Config.Palette.InputMedium);
@@ -1917,7 +1918,7 @@ void TPlan::PrintSvg(ui64 maxTime, ui32& offsetY, TStringBuilder& background, TS
19171918
if (d) {
19181919
title << " " << FormatBytes(s->IngressBytes->Details.Sum * 1000 / d) << "/s";
19191920
if (s->IngressRows) {
1920-
title << ", Rows " << FormatIntegerValue(s->IngressRows->Details.Sum / d) << "/s";
1921+
title << ", Rows " << FormatInteger(s->IngressRows->Details.Sum / d) << "/s";
19211922
}
19221923
}
19231924
PrintTimeline(background, canvas, title, s->IngressBytes->FirstMessage, s->IngressBytes->LastMessage, px, y0, pw, INTERNAL_HEIGHT, Config.Palette.IngressMedium);

ydb/public/lib/ydb_cli/common/plan2svg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class TStage {
147147
std::shared_ptr<TSingleMetric> SpillingChannelTime;
148148
std::shared_ptr<TSingleMetric> SpillingChannelBytes;
149149
TString IngressName;
150+
bool BuiltInIngress = false;
150151
std::shared_ptr<TSingleMetric> IngressBytes;
151152
std::shared_ptr<TSingleMetric> IngressRows;
152153
std::vector<TOperatorInfo> Operators;

0 commit comments

Comments
 (0)