insights: improve scoped insights missing data points
Created by: coury-clark
In Code Insights missing timeseries values are not recorded. That is to say for a repository set {A, B, C}
, the matches {A: 5, B: 2}
will save data for A
and B
but not for C
. In the case of tracking migrations this hurts the experience somewhat, because values can never become zero (missing values are not recorded). To make it slightly more confusing, just-in-time insights (live preview) will show zeroes.
As an example (bottom is JIT and top is after saving):
We don't want (and can't in many cases) to fill out the missing value set with zeroes. For large insights this would be especially difficult / wasteful. Here are some potential ideas to improve this:
- For scoped insights populate the missing values and save with zeroes.
- Track the set of queried times (without repo cardinality) and join this set to the result to coalesce 0 in place of nulls