@@ -1525,42 +1525,8 @@ void TQueryExecutionStats::ExportExecStats(NYql::NDqProto::TDqExecutionStats& st
1525
1525
}
1526
1526
1527
1527
std::unordered_map<TString, NYql::NDqProto::TDqTableStats*> currentTableStats;
1528
- for (auto & [stageId, stageStat] : StageStats) {
1529
- auto & stageStats = *protoStages[stageStat.StageId .StageId ];
1530
- stageStats.SetTotalTasksCount (stageStat.Task2Index .size ());
1531
- stageStats.SetFinishedTasksCount (stageStat.FinishedCount );
1532
-
1533
- stageStats.SetBaseTimeMs (BaseTimeMs);
1534
- stageStat.CpuTimeUs .ExportAggStats (BaseTimeMs, *stageStats.MutableCpuTimeUs ());
1535
- ExportAggStats (stageStat.SourceCpuTimeUs , *stageStats.MutableSourceCpuTimeUs ());
1536
- stageStat.MaxMemoryUsage .ExportAggStats (BaseTimeMs, *stageStats.MutableMaxMemoryUsage ());
1537
-
1538
- ExportAggStats (stageStat.InputRows , *stageStats.MutableInputRows ());
1539
- ExportAggStats (stageStat.InputBytes , *stageStats.MutableInputBytes ());
1540
- ExportAggStats (stageStat.OutputRows , *stageStats.MutableOutputRows ());
1541
- ExportAggStats (stageStat.OutputBytes , *stageStats.MutableOutputBytes ());
1542
- ExportAggStats (stageStat.ResultRows , *stageStats.MutableResultRows ());
1543
- ExportAggStats (stageStat.ResultBytes , *stageStats.MutableResultBytes ());
1544
- ExportAggStats (stageStat.IngressRows , *stageStats.MutableIngressRows ());
1545
- ExportAggStats (stageStat.IngressBytes , *stageStats.MutableIngressBytes ());
1546
- ExportAggStats (stageStat.IngressDecompressedBytes , *stageStats.MutableIngressDecompressedBytes ());
1547
- ExportAggStats (stageStat.EgressRows , *stageStats.MutableEgressRows ());
1548
- ExportAggStats (stageStat.EgressBytes , *stageStats.MutableEgressBytes ());
1549
-
1550
- ExportOffsetAggStats (stageStat.StartTimeMs , *stageStats.MutableStartTimeMs (), BaseTimeMs);
1551
- ExportOffsetAggStats (stageStat.FinishTimeMs , *stageStats.MutableFinishTimeMs (), BaseTimeMs);
1552
- ExportAggStats (stageStat.DurationUs , *stageStats.MutableDurationUs ());
1553
- stageStat.WaitInputTimeUs .ExportAggStats (BaseTimeMs, *stageStats.MutableWaitInputTimeUs ());
1554
- stageStat.WaitOutputTimeUs .ExportAggStats (BaseTimeMs, *stageStats.MutableWaitOutputTimeUs ());
1555
- stageStats.SetUpdateTimeMs (stageStat.UpdateTimeMs > BaseTimeMs ? stageStat.UpdateTimeMs - BaseTimeMs : 0 );
1556
-
1557
- stageStat.SpillingComputeBytes .ExportAggStats (BaseTimeMs, *stageStats.MutableSpillingComputeBytes ());
1558
- stageStat.SpillingChannelBytes .ExportAggStats (BaseTimeMs, *stageStats.MutableSpillingChannelBytes ());
1559
- stageStat.SpillingComputeTimeUs .ExportAggStats (BaseTimeMs, *stageStats.MutableSpillingComputeTimeUs ());
1560
- stageStat.SpillingChannelTimeUs .ExportAggStats (BaseTimeMs, *stageStats.MutableSpillingChannelTimeUs ());
1561
-
1562
- FillStageDurationUs (stageStats);
1563
1528
1529
+ for (auto & [stageId, stageStat] : StageStats) {
1564
1530
for (auto & [path, t] : stageStat.Tables ) {
1565
1531
NYql::NDqProto::TDqTableStats* tableAggr = nullptr ;
1566
1532
if (auto it = currentTableStats.find (path); it != currentTableStats.end ()) {
@@ -1584,6 +1550,7 @@ void TQueryExecutionStats::ExportExecStats(NYql::NDqProto::TDqExecutionStats& st
1584
1550
if (CollectFullStats (StatsMode)) {
1585
1551
auto & stageStats = *protoStages[stageStat.StageId .StageId ];
1586
1552
stageStats.SetTotalTasksCount (stageStat.Task2Index .size ());
1553
+ stageStats.SetFinishedTasksCount (stageStat.FinishedCount );
1587
1554
1588
1555
stageStats.SetBaseTimeMs (BaseTimeMs);
1589
1556
stageStat.CpuTimeUs .ExportAggStats (BaseTimeMs, *stageStats.MutableCpuTimeUs ());
0 commit comments