Skip to content

Improve docs on watchers, zero-duration events and "flooding" #124

@ErikBjare

Description

@ErikBjare

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions