You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-29 23:07:45 +02:00
Comment on linear vs binary search
This commit is contained in:
@@ -227,7 +227,7 @@ func calcBuckets(points []metric.Number, profile test.Profile) []uint64 {
|
||||
counts := make([]uint64, len(sortedBoundaries)+1)
|
||||
idx := 0
|
||||
for _, p := range points {
|
||||
for idx < len(sortedBoundaries) && p.CoerceToFloat64(profile.NumberKind) >= boundaries[idx] {
|
||||
for idx < len(sortedBoundaries) && p.CoerceToFloat64(profile.NumberKind) >= sortedBoundaries[idx] {
|
||||
idx++
|
||||
}
|
||||
counts[idx]++
|
||||
|
||||
Reference in New Issue
Block a user