Repository navigation
fix(memory): show memory pressure, not memory used - #11
Merged
Merged
Conversation
- Drive menu bar, glance row, dial, and history from pressure - Tint memory marks yellow and red at warning and critical - Show used memory as secondary detail in the dashboard - Remove the unused MemorySample.usage property
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Barometry's memory readings showed how much RAM was in use. On macOS a high number there is normal and harmless, because the system keeps memory busy with apps and caches. What tells you the Mac is actually short on memory is memory pressure, which Barometry already read but only showed as a label.
Pressure is now the headline everywhere:
MEMtext readout show the pressure percentage.Memory sparklines and the dial arc keep the section's pink while pressure is normal. They turn yellow at warning and red at critical, as Activity Monitor does, and the headline value takes the same color. System yellow is hard to read as text on a light background, so light mode uses a darker amber instead. The menu bar stays monochrome because macOS tints it.
The percentage comes from
kern.memorystatus_level, the same figurememory_pressurereports. Activity Monitor doesn't document how it draws its pressure graph, so the two won't match exactly.Testing
swift testinPackages/BarometryKitpasses. A new test checks that the menu bar gauge and text readout use pressure rather than used memory.