micrometer icon indicating copy to clipboard operation
micrometer copied to clipboard

Improve memory usage of StepBucketHistogram

Open lenin-jaganathan opened this issue 10 months ago • 0 comments

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.

lenin-jaganathan avatar Apr 09 '24 17:04 lenin-jaganathan