Example #1
0
func (self *PointRange) UpdateRange(point *protocol.Point) {
	timestamp := *point.GetTimestampInMicroseconds()
	if timestamp < self.startTime {
		self.startTime = timestamp
	}
	if timestamp > self.endTime {
		self.endTime = timestamp
	}
}
Example #2
0
func filterColumns(columns map[string]struct{}, fields []string, point *protocol.Point) {
	if _, ok := columns["*"]; ok {
		return
	}

	newValues := []*protocol.FieldValue{}
	newFields := []string{}
	for idx, f := range fields {
		if _, ok := columns[f]; !ok {
			continue
		}

		newValues = append(newValues, point.Values[idx])
		newFields = append(newFields, f)
	}
	point.Values = newValues
}
Example #3
0
func (self *AggregatorEngine) getTimestampFromPoint(point *protocol.Point) int64 {
	return self.getTimestampBucket(*point.GetTimestampInMicroseconds())
}