praekelt/diamondash — pull request #51 by justinvdm (2013-04-08 07:02:06+00:00)
Title: Summarizers should accept a time alignment function

Currently, summarizers determine which bucket a datapoint falls into by rounding it to the nearest multiple of the bucket size. However, this does not always make sense. For example, when summarizing for lvalue widgets (which have a bucket size of `1d`), rounding causes all datapoints past 12pm on a particular day to fall into the next day's bucket. This means that past 12pm, all lvalue widgets' values do not change. In the case of lvalue widgets, the alignment function should be changed from rounding to flooring.