micrometer
micrometer copied to clipboard
Improve memory usage of StepBucketHistogram
While configuring Histograms the expectation is that 16 bytes would be used per bucket (8 bytes - for bucket bound, 8 bytes - for a count of values at a bound). But it seems using StepBucketHistogram (also TimeWindowFixedBoundaryHistogram) uses 8 additional bytes in addition to the required bytes. This is because these implementations seem to hold a local copy of buckets which costs for additional memory footprint.
Expected Behaviour: Histogram only uses (2 * 8) bytes per bucket.