Skip to content

Update fidry/cpu-core-counter - #6620

Open
AJenbo wants to merge 1 commit into
phpstan:2.2.xfrom
AJenbo:cpu-core-counter
Open

AJenbo wants to merge 1 commit into
phpstan:2.2.xfrom
AJenbo:cpu-core-counter

Conversation

@AJenbo

@AJenbo AJenbo commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

This updates fidry/cpu-core-counter to 1.4 which added support for cgroups and lets us simplify CPU detection.

// the counter applies only the first limit found, so each is looked up on its own
// to show a KUBERNETES_CPU_LIMIT that a cgroup quota overrides
$this->printCores($output, 'cgroup CPU quota: %s', (new CgroupCpuQuotaFinder())->find());
$this->printCores($output, 'KUBERNETES_CPU_LIMIT: %s', (new EnvVariableFinder('KUBERNETES_CPU_LIMIT'))->find());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API is private at the moment but I think conceptually it would be more correct to get CpuCoreCounter#countLimitFinder and use the Diagnoser service instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants