rixed / ramen

A stream processing language and compiler for small-scale monitoring
Other
14 stars 4 forks source link

Some functions require additional history during replays #1397

Closed rixed closed 2 years ago

rixed commented 2 years ago

For instance the attached screenshot shows an interesting case where all values cone from the same function, yet in between 2 replays all points are missing bu two.

BugMissingLines

There is actually not really a bug but a design flaw. The missing values are the first values of the new replay, because the function used (OK uses an hysteresis, perc_derivative uses previous.perc, as do cashflow_derivative. And so when the new replay starts with those data, it has no previous data and thus can not compute the value! As an illustration, here is a 10s gap for a LAG-10 function, that is NULL for 10s: lag

rixed commented 2 years ago

Plan:

Alternatives

Issues still:

All these issues are calling for an optional setting to indicate the historical requirement for each function: solves the issues of finding out history requirement in complex cases and of determining archive times when faced with seqnum requirements (no user indication => input is periodic enough to convert seqnums into times).