Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve docs on watchers, zero-duration events and "flooding" #124
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.
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 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: