-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
When calling Query
using a small data set the actual underlying call to calculate the percentile is never used unless the stream has been flushed. It appears just to return the value in a certain index.
q := quantile.NewTargeted(0.5, 0.9, 0.95, 0.99)
q.Insert(float64(5340000000))
q.Insert(float64(5750000000))
q.Insert(float64(5930000000))
q.Insert(float64(6160000000))
q.Insert(float64(6560000000))
q.Insert(float64(1156000000))
fmt.Print(q.Query(0.50)) // 5750000000
fmt.Print(q.Query(0.90)) // 6160000000
fmt.Print(q.Query(0.95)) // 6160000000
fmt.Print(q.Query(0.99)) // 6160000000
Metadata
Metadata
Assignees
Labels
No labels