File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
ydb/core/sys_view/service Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class TExtCountersUpdaterActor
2727 TCounterPtr StorageUsedBytesOnHdd;
2828 TVector<TCounterPtr> CpuUsedCorePercents;
2929 TVector<TCounterPtr> CpuLimitCorePercents;
30+ TCounterPtr TotalCores;
3031 THistogramPtr ExecuteLatencyMs;
3132
3233 TCounterPtr AnonRssSize;
@@ -74,6 +75,17 @@ class TExtCountersUpdaterActor
7475 " resources.cpu.limit_core_percents" , false );
7576 }
7677
78+ double totalCores = 0 ;
79+ for (const auto & pool : Config.Pools ) {
80+ if (pool.Name != " IO" ) {
81+ totalCores += pool.ThreadCount ;
82+ }
83+ }
84+ TotalCores = ydbGroup->GetNamedCounter (" name" , " resources.cpu.total_core_percents" , false );
85+ if (TotalCores) {
86+ TotalCores->Set (totalCores * 100 );
87+ }
88+
7789 ExecuteLatencyMs = ydbGroup->FindNamedHistogram (" name" , " table.query.execution.latency_milliseconds" );
7890
7991 Schedule (TDuration::Seconds (1 ), new TEvents::TEvWakeup);
You can’t perform that action at this time.
0 commit comments