- Kill off the vestiges of the old percentage tally, which was never a
correct approach.
This commit is contained in:
parent
4d91ee5f5c
commit
f7968cb90f
|
@ -132,7 +132,6 @@ func (h *Histogram) bucketForPercentile(percentile float64) (bucket *Bucket, ind
|
||||||
|
|
||||||
observationsByBucket := make([]int, bucketCount)
|
observationsByBucket := make([]int, bucketCount)
|
||||||
cumulativeObservationsByBucket := make([]int, bucketCount)
|
cumulativeObservationsByBucket := make([]int, bucketCount)
|
||||||
cumulativePercentagesByBucket := make([]float64, bucketCount)
|
|
||||||
|
|
||||||
var totalObservations int = 0
|
var totalObservations int = 0
|
||||||
|
|
||||||
|
@ -143,10 +142,6 @@ func (h *Histogram) bucketForPercentile(percentile float64) (bucket *Bucket, ind
|
||||||
cumulativeObservationsByBucket[i] = totalObservations
|
cumulativeObservationsByBucket[i] = totalObservations
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, _ := range h.buckets {
|
|
||||||
cumulativePercentagesByBucket[i] = float64(cumulativeObservationsByBucket[i]) / float64(totalObservations)
|
|
||||||
}
|
|
||||||
|
|
||||||
prospectiveIndex := prospectiveIndexForPercentile(percentile, totalObservations)
|
prospectiveIndex := prospectiveIndexForPercentile(percentile, totalObservations)
|
||||||
|
|
||||||
for i, cumulativeObservation := range cumulativeObservationsByBucket {
|
for i, cumulativeObservation := range cumulativeObservationsByBucket {
|
||||||
|
|
Loading…
Reference in New Issue