Skip to content

Commit 3fce1e1

Browse files
authored
Fix StageDurationUs (#984)
1 parent b02657c commit 3fce1e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ydb/core/kqp/executer_actor/kqp_executer_stats.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ bool CollectProfileStats(Ydb::Table::QueryStatsCollection::Mode statsMode) {
330330
void TQueryExecutionStats::FillStageDurationUs(NYql::NDqProto::TDqStageStats& stats) {
331331
if (stats.HasStartTimeMs() && stats.HasFinishTimeMs()) {
332332
auto startTimeMs = stats.GetStartTimeMs().GetMin();
333-
auto finishTimeMs = stats.GetFinishTimeMs().GetMin();
333+
auto finishTimeMs = stats.GetFinishTimeMs().GetMax();
334334
if (startTimeMs && finishTimeMs > startTimeMs) {
335335
stats.SetStageDurationUs((finishTimeMs - startTimeMs) * 1'000);
336336
}

0 commit comments

Comments
 (0)