Me and @johan-bjareholt just had a conversation about this, I think it's something worthwhile writing good docs about since it's a source of important details about how to handle uncertainty in data.
Zero-duration events
When watchers do polling there can be uncertainty about what happened in between polls. An example is when the window watcher first sees a terminal window, and then 5 seconds later on the second poll sees a browser window. How long was the terminal window active? 5 seconds or shorter?
This leads to an imprecision that is inherent in most forms of polling (but notably not in aw-watcher-afk since it knows how long it was since the last input activity occurred) which we deal with by not making assumptions in the collection stage. The assumptions are postponed to the analysis stage where we apply heuristics like flooding to get cleaner (but less exact) data.
Flooding
Flooding is a technique to fill the empty time interval that occur around zero-duration events.
An example of a flooding rule can be something like this:
- If a zero-duration event
A is followed by a zero-duration event B then A gets its duration extended until the start of B.
- Else if a zero-duration event
A is followed by a longer event C then the longer-duration event gets extended backward until the end of A.
Me and @johan-bjareholt just had a conversation about this, I think it's something worthwhile writing good docs about since it's a source of important details about how to handle uncertainty in data.
Zero-duration events
When watchers do polling there can be uncertainty about what happened in between polls. An example is when the window watcher first sees a terminal window, and then 5 seconds later on the second poll sees a browser window. How long was the terminal window active? 5 seconds or shorter?
This leads to an imprecision that is inherent in most forms of polling (but notably not in aw-watcher-afk since it knows how long it was since the last input activity occurred) which we deal with by not making assumptions in the collection stage. The assumptions are postponed to the analysis stage where we apply heuristics like flooding to get cleaner (but less exact) data.
Flooding
Flooding is a technique to fill the empty time interval that occur around zero-duration events.
An example of a flooding rule can be something like this:
Ais followed by a zero-duration eventBthenAgets its duration extended until the start ofB.Ais followed by a longer eventCthen the longer-duration event gets extended backward until the end ofA.