Beispiel #1
0
// Increment the  ollected count of the group for this edge.
func (e *Edge) incCollected(p models.PointInterface) {
	e.groupMu.Lock()
	defer e.groupMu.Unlock()
	if stats, ok := e.groupStats[p.PointGroup()]; ok {
		stats.collected += 1
	} else {
		stats = &edgeStat{
			collected: 1,
			tags:      p.PointTags(),
			dims:      p.PointDimensions(),
		}
		e.groupStats[p.PointGroup()] = stats
	}
}