aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhor911 <hor911@ydb.tech>2023-12-15 12:40:36 +0300
committerhor911 <hor911@ydb.tech>2023-12-15 13:57:44 +0300
commite2b1b3fc2842abf38631bb8abcfff71d7367e042 (patch)
tree507b5cb2a16bab4296e5b5b9ebc022cd11f5353d
parent98f85629761be979eacf43e22bbed905e3627219 (diff)
downloadydb-e2b1b3fc2842abf38631bb8abcfff71d7367e042.tar.gz
Correct v1/v2 totals
-rw-r--r--ydb/core/fq/libs/compute/common/utils.cpp6
-rw-r--r--ydb/core/fq/libs/control_plane_storage/internal/utils.cpp26
2 files changed, 19 insertions, 13 deletions
diff --git a/ydb/core/fq/libs/compute/common/utils.cpp b/ydb/core/fq/libs/compute/common/utils.cpp
index 0972b74970..d5f22b664f 100644
--- a/ydb/core/fq/libs/compute/common/utils.cpp
+++ b/ydb/core/fq/libs/compute/common/utils.cpp
@@ -71,6 +71,7 @@ struct TTotalStatistics {
TAggregate IngressRows;
TAggregate EgressBytes;
TAggregate EgressRows;
+ TAggregate Tasks;
TAggregates Aggregates;
};
@@ -149,6 +150,8 @@ void WriteNamedNode(NYson::TYsonWriter& writer, NJson::TJsonValue& node, const T
totals.OutputRows.Add(sum);
} else if (name == "TotalOutputBytes") {
totals.OutputBytes.Add(sum);
+ } else if (name == "Tasks") {
+ totals.Tasks.Add(sum);
}
writer.OnKeyedItem(name);
writer.OnBeginMap();
@@ -208,6 +211,8 @@ void WriteNamedNode(NYson::TYsonWriter& writer, NJson::TJsonValue& node, const T
totals.CpuTimeUs.Add(*sum);
} else if (name == "SourceCpuTimeUs") {
totals.SourceCpuTimeUs.Add(*sum);
+ } else if (name == "Tasks") {
+ totals.Tasks.Add(*sum);
}
}
}
@@ -363,6 +368,7 @@ TString GetV1StatFromV2Plan(const TString& plan) {
totals.IngressRows.Write(writer, "IngressRows");
totals.EgressBytes.Write(writer, "EgressBytes");
totals.EgressRows.Write(writer, "EgressRows");
+ totals.Tasks.Write(writer, "Tasks");
writer.OnEndMap();
}
}
diff --git a/ydb/core/fq/libs/control_plane_storage/internal/utils.cpp b/ydb/core/fq/libs/control_plane_storage/internal/utils.cpp
index 780d9bc2c1..aee6c9a4a7 100644
--- a/ydb/core/fq/libs/control_plane_storage/internal/utils.cpp
+++ b/ydb/core/fq/libs/control_plane_storage/internal/utils.cpp
@@ -263,18 +263,18 @@ TString GetPrettyStatistics(const TString& statistics) {
if (p.first.StartsWith("Graph=") || p.first.StartsWith("Precompute=")) {
writer.OnKeyedItem(p.first);
writer.OnBeginMap();
- RemapNode(writer, p.second, "StagesCount", "StagesCount");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.TasksCount", "TasksCount");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.BuildCpuTimeUs", "BuildCpuTimeUs");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.ComputeCpuTimeUs", "ComputeCpuTimeUs");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.Tasks", "Tasks");
RemapNode(writer, p.second, "TaskRunner.Stage=Total.CpuTimeUs", "CpuTimeUs");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.SourceCpuTimeUs", "SourceCpuTimeUs");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.IngressS3SourceBytes", "IngressObjectStorageBytes");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.EgressS3SinkBytes", "EgressObjectStorageBytes");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.IngressPqSourceBytes", "IngressStreamBytes");
- RemapNode(writer, p.second, "TaskRunner.Stage=Total.EgressPqSinkBytes", "EgressStreamBytes");
- RemapNode(writer, p.second, "IngressBytes", "IngressBytes");
- RemapNode(writer, p.second, "EgressBytes", "EgressBytes");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.IngressBytes", "IngressBytes");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.IngressRows", "IngressRows");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.InputBytes", "InputBytes");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.InputRows", "InputRows");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.OutputBytes", "OutputBytes");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.OutputRows", "OutputRows");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.ResultBytes", "ResultBytes");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.ResultRows", "ResultRows");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.EgressBytes", "EgressBytes");
+ RemapNode(writer, p.second, "TaskRunner.Stage=Total.EgressRows", "EgressRows");
writer.OnEndMap();
}
// YQv2
@@ -282,8 +282,8 @@ TString GetPrettyStatistics(const TString& statistics) {
else {
writer.OnKeyedItem(p.first);
writer.OnBeginMap();
- AggregateNode(writer, p.second, "Tasks", "Tasks");
- AggregateNode(writer, p.second, "CpuTimeUs", "CpuTimeUs");
+ RemapNode(writer, p.second, "Tasks", "Tasks");
+ RemapNode(writer, p.second, "CpuTimeUs", "CpuTimeUs");
RemapNode(writer, p.second, "IngressBytes", "IngressBytes");
RemapNode(writer, p.second, "IngressRows", "IngressRows");
RemapNode(writer, p.second, "InputBytes", "InputBytes");