Fix backend linter errors

This commit is contained in:
Alexander Zobnin
2023-08-30 12:48:38 +02:00
parent a536e6d8db
commit c06683cd37
12 changed files with 81 additions and 72 deletions

View File

@@ -96,7 +96,7 @@ func AggPercentile(n float64) AggregationFunc {
return nil
}
sort.Sort(sort.Float64Slice(values))
sort.Float64s(values)
percentileIndex := int(math.Floor(float64(len(values)) * n / 100))
percentile := values[percentileIndex]
return &percentile