Skip to content

Make get_pressure and parse_pressure_record public#335

Merged
eminence merged 1 commit intoeminence:masterfrom
SebastiaanYN:pub-pressure
Feb 8, 2025
Merged

Make get_pressure and parse_pressure_record public#335
eminence merged 1 commit intoeminence:masterfrom
SebastiaanYN:pub-pressure

Conversation

@SebastiaanYN
Copy link
Contributor

When reading CPU pressure from the cgroup fs the full line is included. However, in the CpuPressure struct only some is provided. Making the parser functions public allows reading the full line manually.

Alternatively, if preferred, the CpuPressure struct could be changed to include the full line when present.

@eminence
Copy link
Owner

eminence commented Feb 8, 2025

These changes look fine to me.

If I'm reading things correctly, /proc/pressure/cpu will always contain the full line, but the data will only be meaningful when we're in a cgroup. In addition to this PR here (which can make is possible to easily parse files like /sys/fs/cgroup/user.slice/cpu.pressure so 👍 for this), I'd also be in favor of adding the full PressureRecord to CpuPressure

@eminence eminence merged commit 6a94863 into eminence:master Feb 8, 2025
6 checks passed
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