Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ydb/library/yql/providers/dq/counters/counters.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ struct TCounters {
Counters[name] = TEntry(value);
}

void SetTimeCounter(const TString& name, i64 value) const {
SetCounter(name, value * 1000); // ms => us
}

THashMap<i64, ui64>& GetHistogram(const TString& name) {
return Histograms[name];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,11 @@ class TTaskCommandExecutor {
"TaskRunner",
labels,
name);
auto& old = CurrentJobStats[counterName];
if (name.EndsWith("Time")) {
QueryStat.AddTimeCounter(counterName, value - old);
QueryStat.SetTimeCounter(counterName, value);
} else {
QueryStat.AddCounter(counterName, value - old);
QueryStat.SetCounter(counterName, value);
}
old = value;
}
});
}
Expand Down Expand Up @@ -766,7 +764,6 @@ class TTaskCommandExecutor {
std::unique_ptr<NKikimr::NMiniKQL::TScopedAlloc> Alloc;
NKikimr::NMiniKQL::TComputationNodeFactory ComputationFactory;
TTaskTransformFactory TaskTransformFactory;
THashMap<TString, i64> CurrentJobStats;
NKikimr::NMiniKQL::IStatsRegistry* JobStats;
bool TerminateOnError;
TIntrusivePtr<NDq::IDqTaskRunner> Runner;
Expand Down