func (self *PointRange) UpdateRange(point *protocol.Point) { timestamp := *point.GetTimestampInMicroseconds() if timestamp < self.startTime { self.startTime = timestamp } if timestamp > self.endTime { self.endTime = timestamp } }
func (self *TimestampAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error { timestamps := self.timestamps[series] if timestamps == nil { timestamps = make(map[interface{}]int64) self.timestamps[series] = timestamps } if self.duration != nil { timestamps[group] = *p.GetTimestampInMicroseconds() / *self.duration * *self.duration } else { timestamps[group] = *p.GetTimestampInMicroseconds() } return nil }
func getTimestampFromPoint(window time.Duration, point *protocol.Point) int64 { multiplier := int64(window / time.Microsecond) return *point.GetTimestampInMicroseconds() / int64(multiplier) * int64(multiplier) }
func (self *QueryEngine) getTimestampFromPoint(point *protocol.Point) int64 { return self.getTimestampBucket(uint64(*point.GetTimestampInMicroseconds())) }
func (self *QueryEngine) getTimestampFromPoint(point *protocol.Point) int64 { multiplier := uint64(*self.duration) timestampNanoseconds := uint64(*point.GetTimestampInMicroseconds() * 1000) return int64(timestampNanoseconds / multiplier * multiplier / 1000) }