ContentView declared an @EnvironmentObject it never read, so every
SystemMonitor publish (3 s by default) re-evaluated its body. On macOS
the AppKit tab bridge permanently retains the AnyView(Label(...)) behind
each .tabItem, leaking ~6 KB per tick — 519 MB after three days of
uptime, >90% of the process footprint.
Keep the TabView shells free of observable dependencies:
- ContentView: drop the unused @EnvironmentObject, so the body is
evaluated exactly once.
- SettingsView: split the shell from its two tabs, which now own the
AppSettings observation (dragging a threshold slider leaked 2 labels
per step).
- PerformanceView: drop the write-only selection binding (3 labels per
sub-tab switch).
Two smaller wins while in here:
- GPUMonitor leaked one io_object per GPU poll: leaving a
`defer { release; IOIteratorNext }` loop via break/return hands back an
object nobody releases. Replaced with firstMatch(in:), and removed a
never-released iterator in getAppleSiliconChipName.
- MetricsStore re-encoded the whole 20k-sample history to JSON every
30 s; saveEvery 10 -> 40 (~2 min). flush() on quit and on background
is unchanged.
Measured over 10 minutes (~200 refresh cycles): footprint 86-123 MB with
no upward trend, leaked Label views pinned at 4 — the tab items
themselves. Was 519 MB and climbing ~170 MB/day. 55/55 unit tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
TopManager
A native macOS system monitor application built with SwiftUI. TopManager provides real-time monitoring of system resources including processes, applications, CPU, memory, GPU, storage, and network.
Download
⬇️ Download TopManager 1.0 (.dmg)
Signed with a Developer ID and notarized by Apple — it opens without Gatekeeper warnings. Open the DMG and drag TopManager to your Applications folder. All releases.
Screenshots
Processes
Apps
Performance - CPU
Performance - Memory
Performance - Network
Power & Storage
Features
Processes Tab
- View all running processes with CPU, memory, thread, energy-impact, and per-process disk I/O information
- Sort by any column (name, PID, CPU/Core, CPU/Total, Energy, memory, Disk I/O, threads, user, state)
- Process states: Running, Sleeping, Stopped, Zombie
- Context menu to terminate, force kill, suspend, or resume processes
- Deep-dive inspector (double-click / ⌘I): full executable path, launch arguments, open-file count, disk totals, energy, parent PID, Reveal in Finder
- Search processes by name or PID
Apps Tab
- View running user-facing applications
- Shows app icons, CPU/memory usage, and bundle identifiers
- Quick actions: Activate, Hide, Quit, Force Quit
- Copy bundle ID to clipboard
Performance Tab
- Real-time CPU usage graphs (global and per-core)
- Selectable time range (Live / 5m / 30m / 1h / 24h) backed by persistent history
- Memory usage visualization with donut chart
- Network throughput monitoring
- Support for Apple Silicon P-cores and E-cores
Power & Storage Tab
- System Health score (0–100) with plain-language diagnosis of what's wrong
- Recent Alerts inbox
- Battery & Power: charge, health (cycle-adjusted), cycle count, condition, temperature, power draw, time remaining, adapter wattage (via IOKit)
- System status: macOS version, uptime, thermal state
- CPU and GPU core counts
- GPU memory/VRAM usage
- Storage volumes with usage bars
- Network interface statistics
Proactive monitoring
- Alerts engine with native macOS notifications on sustained high CPU, critical memory pressure, disk almost full, thermal throttling, runaway processes, and low battery — de-duplicated so you're never spammed
- Persistent metric history stored to disk; trends survive restarts
Menu Bar
- Configurable menu-bar metric (CPU % / Memory % / Health / Download)
- Dropdown with live CPU/memory/network/GPU/battery, System Health score, and Top CPU Consumers with one-click quit
Settings (⌘,)
- Launch at login (SMAppService)
- Adjustable refresh interval (1–30 s)
- Notification toggle and alert thresholds (CPU, disk, low battery)
Requirements
- macOS 13.0 or later
- Xcode 15.0 or later (for building)
Building
-
Clone the repository:
git clone https://github.com/hariel1985/TopManager.git -
Open
TopManager.xcodeprojin Xcode -
Build and run (⌘R)
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Testing
Logic is covered by an XCTest suite (TopManagerTests, 55 tests) run via
scripts/test.sh test. The full manual + automated process is documented in
docs/TESTING.md, and the product direction in
docs/VALUE_PLAN.md.
Acknowledgments
Built with SwiftUI and native macOS APIs including:
libproc/rusage_infofor process information, disk I/O and energy signalsIOKitfor GPU, battery (AppleSmartBattery) and hardware monitoringMetalfor GPU detectionSystemConfigurationfor network monitoringUserNotificationsfor proactive alertsServiceManagement(SMAppService) for launch-at-login- Swift
Chartsfor time-series visualization





