Skip to content

Add live CPU and RAM monitoring during generation - #776

Merged
ShiftHackZ merged 2 commits into
developfrom
feature/generation-performance-overlay
Nov 19, 2026
Merged

ShiftHackZ merged 2 commits into
developfrom
feature/generation-performance-overlay

Conversation

@ShiftHackZ

Copy link
Copy Markdown
Owner

Description

Adds live CPU and RAM charts to generation progress dialogs on Android and iOS, including model loading. The Settings switch is enabled by default and preserves saved choices.

  • Both charts show app and device usage with distinct solid lines, translucent fills, matching numbers and a shared legend. Unavailable readings are hidden.
  • Android app readings include the UI and inference processes through on-demand IPC. RAM uses proportional resident memory without swap; device usage includes reclaimable caches. iOS device RAM also includes caches.
  • Sampling runs only while an enabled progress dialog is visible and resumed, with bounded history and cancellation-safe cleanup.
  • Keeps Core ML Cancel available independently of the legacy local cancellation preference.

Addresses #176.

Checklist

  • Preserves existing functionality and saved preferences.
  • Adds automated coverage for the new behavior and removes unused labels/code.
  • Documents new and changed public contracts.

Validation

  • 36 additional unit scenarios covering CPU counter boundaries, preference persistence/backup, Settings intents, memory accounting and worker telemetry validation/timeouts/cancellation.
  • Five affected unit suites: 1,408 passed, 18 existing skips, no failures.
  • FullDev APK and shared iOS device compilation passed. Kotlin lint, presentation architecture verification and Android Studio formatting checks passed.

Tested On

Earlier normal generation flows were exercised on an Android emulator and iOS Simulator. The final Android RAM-accounting change has not been rerun through the application; physical-device validation remains pending.

@ShiftHackZ ShiftHackZ linked an issue Nov 19, 2026 that may be closed by this pull request
@ShiftHackZ
ShiftHackZ merged commit bc5165c into develop Nov 19, 2026
26 of 28 checks passed
@ShiftHackZ
ShiftHackZ deleted the feature/generation-performance-overlay branch November 19, 2026 21:30
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.

RAM usage visualisation

1 participant