BOOT / KERNEL HANDOFF
SHELL / PROOT UBUNTU AARCH64
STREAM / DOCUMENT CHANNEL OPEN
MODULES / PROJECT INDEX 09 NODES
READY / PAGE INTERFACE
0%
PARTICLES /
> dreamucxe
BACK / HOMEROOT

PROJECT / 05 / README LINKED NODE / DEVICEHEALTHLAB STATUS / SOURCE ONLY

device health lab

A system health monitor for battery, thermal and performance, built around a sealed MetricValue type that makes a fabricated metric fail to compile.

  • KOTLIN
  • ROOM
  • HILT
  • WORKMANAGER
  • DATASTORE
READ DOCUMENTATION VIEW SOURCE ↗ NO RELEASE ASSET PUBLISHED — SOURCE ONLY
DEVICEHEALTHLAB // METRICS ACTUAL / UI
CAPTURE / PENDING BATT / THERMAL / PERF
REMOTE DOCUMENT / README.md

Project documentation

SYNC / FETCHING

The type is the policy

Data honesty is usually a convention, which means it survives exactly as long as the developer remembers it. Here it is a type. Nothing reaches the UI as a bare number — it arrives as a MetricValue, and rendering one means handling the case where the platform would not answer.

sealed interface MetricValue {
    data class Real(val value: Double, val unit: String) : MetricValue
    data class Estimated(val value: Double, val basis: String) : MetricValue
    data class RootSourced(val value: Double, val path: String) : MetricValue
    data object Unavailable : MetricValue
}

An estimate carries the basis it was derived from. A root-sourced reading carries the sysfs path it came from. Unavailable is a first-class outcome rather than a zero, so an unanswerable question never renders as a confident 0.

Coverage

  • Battery health, charge cycles and discharge behaviour over time.
  • Thermal zones and throttling events.
  • Device and system-performance health sampled on a WorkManager schedule.
  • History persisted in Room; preferences in DataStore.