Skip to content

Commit eefcef2

Browse files
authored
Merge efbca4c into dbf7e40
2 parents dbf7e40 + efbca4c commit eefcef2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ydb/library/yql/providers/dq/counters/counters.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ struct TCounters {
6161
Counters[name] = TEntry(value);
6262
}
6363

64+
void SetTimeCounter(const TString& name, i64 value) const {
65+
SetCounter(name, value * 1000); // ms => us
66+
}
67+
6468
THashMap<i64, ui64>& GetHistogram(const TString& name) {
6569
return Histograms[name];
6670
}

ydb/library/yql/providers/dq/runtime/task_command_executor.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,11 @@ class TTaskCommandExecutor {
127127
"TaskRunner",
128128
labels,
129129
name);
130-
auto& old = CurrentJobStats[counterName];
131130
if (name.EndsWith("Time")) {
132-
QueryStat.AddTimeCounter(counterName, value - old);
131+
QueryStat.SetTimeCounter(counterName, value);
133132
} else {
134-
QueryStat.AddCounter(counterName, value - old);
133+
QueryStat.SetCounter(counterName, value);
135134
}
136-
old = value;
137135
}
138136
});
139137
}
@@ -766,7 +764,6 @@ class TTaskCommandExecutor {
766764
std::unique_ptr<NKikimr::NMiniKQL::TScopedAlloc> Alloc;
767765
NKikimr::NMiniKQL::TComputationNodeFactory ComputationFactory;
768766
TTaskTransformFactory TaskTransformFactory;
769-
THashMap<TString, i64> CurrentJobStats;
770767
NKikimr::NMiniKQL::IStatsRegistry* JobStats;
771768
bool TerminateOnError;
772769
TIntrusivePtr<NDq::IDqTaskRunner> Runner;

0 commit comments

Comments
 (0)