-
Notifications
You must be signed in to change notification settings - Fork 13
Moving averages for reports using cycle-time / percent_of #4
Description
Currently the averages in the report are counted from the beginning of the program, without exception. This can be a problem if you're watching a process whose behavior is changing. Instead, the report could calculate the average over recent data only, and thus reflect changes in behavior much more quickly by only summarizing recent behavior.
Two common ways to do this would be an exponential moving average (EMA) algorithm, or a sliding window (SW). EMA is computationally simple, and thus would be my choice, but it's harder to explain and understand. SW literally just averages over the last N events instead of back to the beginning of the program. SW is much easier to understand, but requires a lot more computational overhead. SW also has some undesirable "ringing" properties in how it responds to periodically changing behavior whereas EMA does a better job of averaging those out.
The simplest (for the user) thing I can think of would be to switch to EMA after some number of cycles. Default to 100 say, but configurable like timebugdet.ema_after = 10 if you want to see behavior changes reflected more quickly.