func (s *Summary) Merge(o Summary) {
	switch {
	case s.Cnt == 0:
		*s = o
		return
	case o.Cnt == 0:
		return
	}

	if o.Max > s.Max {
		s.Max = o.Max
	}

	if o.Min < s.Min {
		s.Min = o.Min
	}

	s.Cnt += o.Cnt
	s.Sum += o.Sum

	// TODO: Is there a numerically stable way of doing this.
	//   - When o.Avg and s.Avg are close in value, we lose precision.
	s.Avg = s.Avg + (o.Avg-s.Avg)*float64(o.Cnt)/float64(s.Cnt)
}
// Merge another summary into this one.
Merge another summary into this one.
// Merge another summary into this one .
func (s *Summary) Merge(o Summary) {
	switch {
	case s.Cnt == 0:
		*s = o
		return
	case o.Cnt == 0:
		return
	}
	if o.Max > s.Max {
		s.Max = o.Max
	}
	if o.Min < s.Min {
		s.Min = o.Min
	}
	s.Cnt += o.Cnt
	s.Sum += o.Sum
	s.Avg = s.Avg + (o.Avg-s.Avg)*float64(o.Cnt)/float64(s.Cnt)
}
func ( s * Summary ) Merge ( o Summary ) { switch { case s . Cnt == 0 : * s = o return case o . Cnt == 0 : return } if o . Max > s . Max { s . Max = o . Max } if o . Min < s . Min { s . Min = o . Min } s . Cnt += o . Cnt s . Sum += o . Sum s . Avg = s . Avg + ( o . Avg - s . Avg ) * float64 ( o . Cnt ) / float64 ( s . Cnt ) }
Merge another summary into this one.
Merge another summary into this one .
// TODO: Is there a numerically stable way of doing this. //   - When o.Avg and s.Avg are close in value, we lose precision.