Skip to content

Commit

Permalink
Change calculation of actorsystem usage 24-2 (#6271)
Browse files Browse the repository at this point in the history
  • Loading branch information
kruall authored Jul 4, 2024
1 parent 7e83af2 commit dfc8e0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ydb/library/actors/helpers/pool_stats_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ class TStatsCollectingActor : public TActorBootstrapped<TStatsCollectingActor> {

double seconds = UsageTimer.PassedReset();

numThreads = poolStats.PotentialMaxThreadCount;

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

0 comments on commit dfc8e0f

Please sign in to comment.