Skip to content

Commit ee4ca19

Browse files
Merge 821b80b into bf4bc95
2 parents bf4bc95 + 821b80b commit ee4ca19

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void TFetchingScript::Allocation(const std::set<ui32>& entityIds, const EStageFe
120120

121121
TString IFetchingStep::DebugString() const {
122122
TStringBuilder sb;
123-
sb << "name=" << Name << ";duration=" << SumDuration << ";"
123+
sb << "name=" << Name << ";duration=" << GetSumDuration() << ";"
124124
<< "size=" << 1e-9 * SumSize << ";details={" << DoDebugString() << "};";
125125
return sb;
126126
}

ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class TFetchingStepsSignalsCollection: public NColumnShard::TCommonCountersOwner
6767
class IFetchingStep: public TNonCopyable {
6868
private:
6969
YDB_READONLY_DEF(TString, Name);
70-
YDB_READONLY(TDuration, SumDuration, TDuration::Zero());
70+
TAtomicCounter SumDuration;
7171
YDB_READONLY(ui64, SumSize, 0);
7272
TFetchingStepSignals Signals;
7373

@@ -78,8 +78,12 @@ class IFetchingStep: public TNonCopyable {
7878
}
7979

8080
public:
81+
TDuration GetSumDuration() const {
82+
return TDuration::MicroSeconds(SumDuration.Val());
83+
}
84+
8185
void AddDuration(const TDuration d) {
82-
SumDuration += d;
86+
SumDuration.Add(d.MicroSeconds());
8387
Signals.AddDuration(d);
8488
}
8589
void AddDataSize(const ui64 size) {

0 commit comments

Comments
 (0)