Skip to content

Commit

Permalink
Change calculation of actorsytem pool usage (#6267)
Browse files Browse the repository at this point in the history
  • Loading branch information
kruall authored Jul 4, 2024
1 parent 12caba2 commit 3170a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ydb/library/actors/helpers/pool_stats_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class TStatsCollectingActor : public TActorBootstrapped<TStatsCollectingActor> {
double seconds = UsageTimer.PassedReset();

// TODO[serxa]: It doesn't account for contention. Use 1 - parkedTicksDelta / seconds / numThreads KIKIMR-11916
const double currentThreadCount = poolStats.CurrentThreadCount;
const double currentThreadCount = poolStats.PotentialMaxThreadCount;
const double elapsed = NHPTimer::GetSeconds(stats.ElapsedTicks);
const double currentUsage = currentThreadCount > 0 ? ((elapsed - LastElapsedSeconds) / seconds / currentThreadCount) : 0;
LastElapsedSeconds = elapsed;
Expand Down

0 comments on commit 3170a18

Please sign in to comment.