Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryConsumptionTracker ¶
type MemoryConsumptionTracker struct { MaxEstimatedMemoryConsumptionBytes uint64 CurrentEstimatedMemoryConsumptionBytes uint64 PeakEstimatedMemoryConsumptionBytes uint64 // contains filtered or unexported fields }
MemoryConsumptionTracker tracks the current memory utilisation of a single query, and applies any max in-memory bytes limit.
It also tracks the peak number of in-memory bytes for use in query statistics.
It is not safe to use this type from multiple goroutines simultaneously.
func NewMemoryConsumptionTracker ¶
func NewMemoryConsumptionTracker(maxEstimatedMemoryConsumptionBytes uint64, rejectionCount prometheus.Counter) *MemoryConsumptionTracker
func (*MemoryConsumptionTracker) DecreaseMemoryConsumption ¶
func (l *MemoryConsumptionTracker) DecreaseMemoryConsumption(b uint64)
DecreaseMemoryConsumption decreases the current memory consumption by b bytes.
func (*MemoryConsumptionTracker) IncreaseMemoryConsumption ¶
func (l *MemoryConsumptionTracker) IncreaseMemoryConsumption(b uint64) error
IncreaseMemoryConsumption attempts to increase the current memory consumption by b bytes.
It returns an error if the query would exceed the maximum memory consumption limit.
Click to show internal directories.
Click to hide internal directories.