Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
Allocator handles byte slices for bloom queriers. It exists to reduce the cost of allocations and allows to re-use already allocated memory.
type BytePool ¶
type BytePool struct {
// contains filtered or unexported fields
}
BytePool uses a sync.Pool to re-cycle already allocated buffers.
func NewBytePoolAllocator ¶
type MemPool ¶
type MemPool struct {
// contains filtered or unexported fields
}
MemPool is an Allocator implementation that uses a fixed size memory pool that is split into multiple slabs of different buffer sizes. Buffers are re-cycled and need to be returned back to the pool, otherwise the pool runs out of available buffers.
func New ¶
func New(name string, buckets []Bucket, r prometheus.Registerer) *MemPool
type SimpleHeapAllocator ¶
type SimpleHeapAllocator struct{}
SimpleHeapAllocator allocates a new byte slice every time and does not re-cycle buffers.
func (*SimpleHeapAllocator) Put ¶
func (a *SimpleHeapAllocator) Put([]byte) bool
Click to show internal directories.
Click to hide internal directories.