Skip to content

Commit 62614f2

Browse files
Added spilling queue counters (#17394)
1 parent 3892bcc commit 62614f2

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

ydb/library/yql/dq/actors/spilling/spilling_counters.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ TSpillingCounters::TSpillingCounters(const TIntrusivePtr<::NMonitoring::TDynamic
1111
SpillingNoSpaceErrors = counters->GetCounter("Spilling/NoSpaceErrors", true);
1212
SpillingIoErrors = counters->GetCounter("Spilling/IoErrors", true);
1313
SpillingFileDescriptors = counters->GetCounter("Spilling/FileDescriptors", false);
14+
SpillingIOQueueSize = counters->GetCounter("Spilling/IOQueueSize", false);
1415
}
1516

1617
} // namespace NYql::NDq

ydb/library/yql/dq/actors/spilling/spilling_counters.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct TSpillingCounters : public TThrRefBase {
1818
::NMonitoring::TDynamicCounters::TCounterPtr SpillingNoSpaceErrors;
1919
::NMonitoring::TDynamicCounters::TCounterPtr SpillingIoErrors;
2020
::NMonitoring::TDynamicCounters::TCounterPtr SpillingFileDescriptors;
21+
::NMonitoring::TDynamicCounters::TCounterPtr SpillingIOQueueSize;
2122
};
2223

2324
struct TSpillingTaskCounters : public TThrRefBase {

ydb/library/yql/dq/actors/spilling/spilling_file.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ class TDqLocalFileSpillingService : public TActorBootstrapped<TDqLocalFileSpilli
712712
TAG(TH2) { s << "Active files"; }
713713
PRE() { s << "Used space: " << TotalSize_ << Endl; }
714714
PRE() { s << "Used file descriptors: " << Counters_->SpillingFileDescriptors->Val() << Endl; }
715+
PRE() { s << "IO queue size: " << Counters_->SpillingIOQueueSize->Val() << Endl; }
715716

716717
for (const auto& tx : byTx) {
717718
TAG(TH2) { s << "Transaction " << tx.first; }
@@ -824,6 +825,7 @@ class TDqLocalFileSpillingService : public TActorBootstrapped<TDqLocalFileSpilli
824825

825826
fd.HasActiveOp = true;
826827

828+
Counters_->SpillingIOQueueSize->Set(IoThreadPool_->Size() + 1);
827829
return IoThreadPool_->AddAndOwn(std::move(op));
828830
}
829831

0 commit comments

Comments
 (0)