mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
fix(charts): serve the All range's coarse buckets as their average day
The All range is read from the WEEK or MONTH rollup tier once a history is long enough, from DAY rows for a short one, and from the live table on a coverage miss. The chart folds every path into the average day of each week or month, but a tier row carried a cumulative metric's whole total and a level's reading-weighted mean. A month of steps therefore read about thirty times higher for a long history than for a short one, under a caption that said average. A tier row now carries the average day of its bucket on every tier: a cumulative metric's total over the days that hold a reading, a level's mean of its daily means. The rollup fold counts the bucket's days and adds up their means for it. Only the web chart's series reads (the chart endpoint and the dashboard batch) use these rows.
This commit is contained in:
1 parent
c7e53176c1
commit
b45a668cf4
6 files changed
+365
-25
No files matched your search
@@ -40744,7 +40744,9 @@ components:
|
||||
$ref: "#/components/schemas/MeasurementType"
|
||||
value:
|
||||
type: number
|
||||
description: Daily mean (spot metrics) or SUM (cumulative).
|
||||
description: "The day's mean (spot metrics) or total (cumulative). A row of a coarser tier (a window longer than the
|
||||
daily cap) carries the average day of its bucket, the same quantity: a spot metric's mean of its
|
||||
daily means, a cumulative metric's total over the days of the bucket that hold a reading."
|
||||
measuredAt:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
Reference in new issue
Block a user