1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 15:04:42 +00:00

refactor: optimize CPU temp feature with tests and performance fix

- Restore performance test threshold to 200ms (from 500ms)
  User caching is highly effective (~8ms for 100 calls)
- Add unit tests for colorizeTemp() covering thresholds and edge cases
This commit is contained in:
Tw93
2026-01-14 10:31:01 +08:00
parent 55b61eeb09
commit 5afd602027
2 changed files with 55 additions and 1 deletions

View File

@@ -117,7 +117,7 @@ setup() {
elapsed=$(( (end - start) / 1000000 ))
[ "$elapsed" -lt 500 ]
[ "$elapsed" -lt 200 ]
}
@test "get_darwin_major caches correctly" {