Playtime: average over the days recorded, full bars for leaders under an hour

Busiest hours and the heatmap averaged over 30 days (4 weeks) even when
recording began yesterday; they now use only the days since it began, and
say so. Bars capped their scale at 1, so a leader with 0.5 h got half a
bar. The hours tile keeps a decimal under 10, and K/D shows - with no
kills or deaths yet.
This commit is contained in:
Astra 2026-10-04 22:24:37 +01:00
parent f659859d66
commit c7fbff0e43
4 changed files with 57 additions and 14 deletions

View file

@ -295,7 +295,7 @@ when `SAW_TEST_PT_DSN` is set. It drops and recreates PlaytimeHistory's tables f
give it a scratch database:
```
podman run -d --rm --name pt-test -e MARIADB_ROOT_PASSWORD=test -e MARIADB_DATABASE=playtime_history -p 127.0.0.1:33071:3306 mariadb:11
podman run -d --rm --name pt-test -e MARIADB_ROOT_PASSWORD=test -e MARIADB_DATABASE=playtime_history -p 127.0.0.1:33071:3306 mariadb:10.6
SAW_TEST_PT_DSN='root:test@tcp(127.0.0.1:33071)/playtime_history' go test ./internal/playtime -run DB
```