Utilities to process and serve timeseries at variable granularity