Skip to content

fix(memory): show memory pressure, not memory used - #11

Merged
WolffTech merged 1 commit into
mainfrom
fix/memory-pressure-metrics
Oct 14, 2026
Merged

WolffTech merged 1 commit into
mainfrom
fix/memory-pressure-metrics

Conversation

@WolffTech

Copy link
Copy Markdown
Owner

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:

  • Menu bar: the memory gauge and the MEM text readout show the pressure percentage.
  • Glance row: the value and sparkline show pressure. The subtitle still shows "12.44 GB of 36 GB", with "High pressure" or "Critical pressure" added when the level rises.
  • Cluster dial: the needle and value show the pressure percentage. The caption still shows the level.
  • Details: the header shows pressure. The old Pressure row is now "Memory used", so the used amount still appears there.

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 figure memory_pressure reports. Activity Monitor doesn't document how it draws its pressure graph, so the two won't match exactly.

Testing

  • swift test in Packages/BarometryKit passes. A new test checks that the menu bar gauge and text readout use pressure rather than used memory.
  • A Debug build of the app succeeds.
  • Not yet checked by hand: the warning and critical colors in the running app, in light and dark mode.

- 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
@WolffTech
WolffTech merged commit e087013 into main Oct 14, 2026
2 checks passed
@WolffTech
WolffTech deleted the fix/memory-pressure-metrics branch November 10, 2026 20:23
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.

1 participant