Releases: Krish033/powerstat
Releases · Krish033/powerstat
Release list
PowerStats v1.0.0
Added
- Async startup: Analytics data is now loaded on a background thread via
GLib.idle_add, eliminating the UI freeze on launch. A spinner is shown while data loads. - Structured logging: All modules now use Python's
loggingframework with a consistent%(asctime)s [%(levelname)s] %(name)s: %(message)sformat. Startup timing is logged at INFO level. - Central version module (
version.py): Single source of truth for__version__,__app_id__,__app_name__, etc. Version is displayed in the window subtitle. - Professional app icon: New SVG icon (
data/icons/powerstats.svg) with energetic orange/dark-slate palette. Includes a symbolic variant for GNOME panel/headerbar. - Transparency Model page: "View Transparency Model" button opens a dedicated page explaining
🟢 Hardware Measured,🟡 Estimated, and🔴 Low Confidencedata sources. - Diagnostic Feed: Main view includes an "Insights Feed" with contextual warnings (thermal spikes, background drain, battery aging forecast, daily comparisons).
- Top Battery Culprits section: Highlights the top 2 highest-drain applications with human-readable behavioral explanations.
- Timeline Analysis graph on app details page: Click-to-select bucket interaction with per-bucket usage breakdown.
- Battery Aging Forecast: Reads
upowercapacity data and displays percentage of original design capacity remaining. - Power Modes: Combo row to switch between Balanced / Quiet / Analyze / Battery Saver polling intervals. Setting persisted to
~/.config/powerstats/config.json. - Force Stop with safety guard: Disabled for critical system processes (
gnome-shell,systemd,pipewire, etc.). Confirmation dialog for user apps. - Non-linear power math engine:
pow(cpu_time, 1.4) * freq_scaling_factorfor realistic exponential power curves. - Intel RAPL support: Reads exact microjoule consumption from
/sys/class/powercap/intel-rapl/, falls back gracefully without root. - Duration accuracy fix: Observed time span used instead of full bucket width to prevent overcounting when daemon wasn't running for the entire bucket period.
- WAL journal mode:
PRAGMA journal_mode=WALeliminates lock contention between daemon writes and UI reads. - Database auto-pruning: Data older than 7 days is purged every hour to prevent unbounded SQLite growth.
- Cascading foreign keys:
process_statsentries are auto-deleted viaON DELETE CASCADEwhen their parentsnapshotsrow is pruned. - Performance indexes:
idx_snapshots_timestamp,idx_process_stats_snapshot_id,idx_process_stats_namefor fast UI queries. - Debian package (
powerstats_1.0.0_all.deb): Professional.debwithDEBIAN/control,postinst,prerm,postrm— auto-enables daemon on install, refreshes icon/desktop caches. - Build scripts (
scripts/build.sh,scripts/package.sh,scripts/release.sh,scripts/install.sh): Full build/validate/release/install automation. - About dialog: Native
Adw.AboutDialogaccessible from the header bar with version, license, website, and issue tracker. - systemd user service (
packaging/powerstats.service): Daemon runs persistently in the background withRestart=on-failure. - Tests (
tests/test_analytics.py): 7 unit tests covering empty DB, chronological buckets, categorization, partial/full bucket duration, 12-month labels,start_time_dtpresence, and numeric battery usage. - GitHub community files:
LICENSE(GPL-3.0),CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.md, issue templates, PR template. - GitHub Actions CI (
.github/workflows/): lint, test, and release workflows.
Changed
- App ID changed from
com.example.PowerStatstoio.github.powerstats.PowerStats. - All inline
import json,import os,import subprocessmoved to module-level top-of-file imports. Makefilenow supportsmake lint,make test,make cleantargets and reads version dynamically..desktopfile updated withGenericName,StartupWMClass, and expandedKeywords.packaging/powerstats.servicenow logs to systemd journal withSyslogIdentifier=powerstats-daemon.- README completely rewritten with professional structure, badges, architecture overview, and usage examples.
Fixed
_on_power_mode_changedno longer uses inline imports.AppDetailsPageheader bar now shows the app name instead of "PowerStats" (which was confusing when viewing a specific app's details).