marketstore icon indicating copy to clipboard operation
marketstore copied to clipboard

Adding additional timeframe buckets, is a bit of a process.

Open bdowling opened this issue 6 years ago • 1 comments

I was fooled by the config into thinking I could just enter another entry in the list, but realized this does not actually handle the mappings from these tags.

To solve, I added an entry to Timeframes, and rebuilt my docker image

I thought I was going to need to resend my data into the 1Min bucket for the ondiskagg to populate the new timeslot, but somehow it already did this? Not certain how exactly this magic happens, but that was surprising. ;)

Just posting this idea out here, as it feels like this could be easier, e.g. TimeframeStrings can already be parsed, why not let the buckets be a bit more dynamic?

--- a/utils/timeframe.go
+++ b/utils/timeframe.go
@@ -26,6 +26,7 @@ var timeframeDefs = []Timeframe{
 var Timeframes = []*Timeframe{
        {"1Min", time.Minute},
        {"5Min", 5 * time.Minute},
+       {"10Min", 10 * time.Minute},
        {"15Min", 15 * time.Minute},
        {"1H", time.Hour},
        {"4H", 4 * time.Hour},

bdowling avatar Sep 12 '18 05:09 bdowling

Yeah, this list does not make much sense and we should accept any timeframe between 1 sec to years. That change may need a bit more thought though.

umitanuki avatar Sep 12 '18 06:09 umitanuki