Skip to content

Proposal: simplify Go runtime/metrics histogram buckets #1287

Open
@bboreham

Description

@bboreham

I looked at go_gc_heap_allocs_by_size_bytes_bucket, and found it strange that the buckets include le="24.999999999999996" and le="64.99999999999999".

With help from @beorn7 I believe this is because the bucket is defined as "less than 25", "less than 65", etc., modified by math.NextAfter():

upperBound := math.Nextafter(h.buckets[i+1], h.buckets[i])

I propose we take advantage of the knowledge that fractional values do not show up in byte counts, and adjust the buckets as le="24", le="64", ...

This would be a breaking change for anyone relying on the exact values, but overall a benefit.

I'm using v1.15.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions