Skip to content

nhcb: interning of bucket boundaries #13490

@krajorama

Description

@krajorama

Proposal

Depends on #13487

In this feature we take advantage of the fact that custom bucket definition is never written and when loading vector selectors, the chunk iterator is reused. Thus the CustomValues []float64 field in histogram.Histogram, histogram.FloatHistogram, writev2.Histogram can be interned (passed by slice reference) and not copied all the time.

  • Make sure there's a benchmark test for vector selector over custom histograms.
  • The histogram and float histogram chunk iterator implementation should intern the custom buckets, that is set in the returned histogram as a slice reference.
  • Implement that the chunk iterator reuses the previous value of customBounds when the iterator is reused.
  • Verify with the benchmark / other means that customBounds is interned correctly.
  • Investigate accepting samples via RW2.0 vs interning. Is there any opportunity to optimize?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions