IBM / sliding-window-aggregators

Reference implementations of sliding window aggregation algorithms
Apache License 2.0
42 stars 16 forks source link

Fix bulk benchmarks to respect bulk size #57

Closed scotts closed 2 years ago

scotts commented 2 years ago

Updates the bulk_evict algorithm so that it respects the bulk size, and adds a bulk_evict_insert algorithm that should also respect the bulk size.

Something to pay close attention to: the exact parameters that bulkEvict(time) is accepting right now. The expression I'm providing is i - exp.window_size + exp.bulk_size - 1. I'm assuming that bulkEvict(time) means "evict up to and including time". In the expression, i is the the next timestamp we want to insert. Subtracting exp.window_size gets us to the first element in the window. Adding exp.bulk_size gets us to the first element past the point of bulk eviction, and subtracting 1 gets us to the last element in the bulk eviction. But we should check my reasoning on that.