Event Debounce Window Filter

Plan trailing-edge debounce emissions: retain the last event of each burst separated by strictly more than the quiet window; assumes no future events after the supplied list.

Description

Plan trailing-edge debounce emissions: retain the last event of each burst separated by strictly more than the quiet window; assumes no future events after the supplied list.

Trailing-edge debounce keeps the final event in a cluster separated by short gaps. It emits only after the chosen quiet period has elapsed.

When to use this tool

Plan trailing-edge debounce emissions: retain the last event of each burst separated by strictly more than the quiet window; assumes no future events after the supplied list.

  • Prepare the supplied eventTimes, quietWindow fields for this operation.
  • Compare the complete example with the representation used by your own input before carrying the result into another step.

How to use the tool and how it works

  1. Enter eventTimes, quietWindow. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.acceptedIndexes, result.emissionTimes. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

For each nondecreasing event time, keep it if it is the last event or if the next gap is strictly greater than quietWindow. Return accepted indexes and emission times equal to event time plus quietWindow.1

Input fieldMeaning and representationAccepted input
eventTimesevent times.List of finite numbers; bounded by the operation
quietWindowquiet window.Finite number; zero or greater
Output fieldInterpretation
resultObject containing the named outputs below.
result.acceptedIndexesThe accepted indexes list in the ordering and representation described above.
result.emissionTimesThe emission times list in the ordering and representation described above.
json
{
  "input": {
    "eventTimes": [
      0,
      1,
      5
    ],
    "quietWindow": 2
  },
  "output": {
    "result": {
      "acceptedIndexes": [
        1,
        2
      ],
      "emissionTimes": [
        3,
        7
      ]
    }
  }
}

Limitations and assumptions

  • A gap exactly equal to quietWindow remains in the same cluster. The final event is assumed to be followed by silence; the tool does not observe a live stream or cancel timers.
  • Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
  • Ordinary string lists have at most 128 entries of at most 128 code units each; numeric lists and matrices have separate bounded size checks. Nonfinite results and excessively large serialized outputs are rejected.
  • Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.

Alternative or Complementary methods

Choose a sampling model before combining results. Earlier-sample hold, linear interpolation and index-only differences answer different questions; event cooldown, debounce and rolling limits also use different acceptance rules.

References

  1. Tool behavior and example: Event Debounce Window Filter — tool.io

Similar or alternative tools

  • Event Cooldown Acceptance Trace

    Accept the first event and later events at least the caller cooldown after the last accepted event; rejected events do not restart the cooldown.

  • Event Rate Limit Acceptance Trace

    Trace sliding-window rate limits over accepted events in (t−window,t]; rejected events do not consume acceptance capacity.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies