mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-12 20:28:36 -07:00
Add log normal distributions to the percentile calculation tests
This commit is contained in:
@@ -40,7 +40,7 @@ func (p *Percentile) Value() float64 {
|
||||
func (p *Percentile) AddSample(sample float64) {
|
||||
p.samples++
|
||||
|
||||
if p.samples > int64(cap(p.values)) {
|
||||
if len(p.values) == cap(p.values) {
|
||||
target := float64(p.samples)*p.percentile - float64(cap(p.values))/2
|
||||
offset := round(math.Max(target, 0))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user