(hash uint64, s *histogramSeries, value float64, traceID string, multiplier float64)
| 153 | } |
| 154 | |
| 155 | func (h *histogram) updateSeries(hash uint64, s *histogramSeries, value float64, traceID string, multiplier float64) { |
| 156 | s.count.Add(1 * multiplier) |
| 157 | s.sum.Add(value * multiplier) |
| 158 | |
| 159 | for i, bucket := range h.buckets { |
| 160 | if value <= bucket { |
| 161 | s.buckets[i].Add(1 * multiplier) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | bucket := sort.SearchFloat64s(h.buckets, value) |
| 166 | s.exemplars[bucket].Store(traceID) |
| 167 | s.exemplarValues[bucket].Store(value) |
| 168 | |
| 169 | s.lastUpdated.Store(time.Now().UnixMilli()) |
| 170 | h.lifecycler.OnUpdate(hash, h.activeSeriesPerHistogramSerie()) |
| 171 | } |
| 172 | |
| 173 | func (h *histogram) name() string { |
| 174 | return h.metricName |
no test coverage detected