Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultInlineThreshold = 256 InlineHardMin = DefaultInlineThreshold InlineHardMax = 2048 DefaultStep = 64 UpdateInterval = 100 // K commits )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller manages the adaptive inline threshold.
func New ¶
func New() *Controller
func (*Controller) GetThreshold ¶
func (c *Controller) GetThreshold() int
GetThreshold returns the current threshold to use for a new batch.
func (*Controller) RecordCommit ¶
func (c *Controller) RecordCommit(m Metrics)
RecordCommit updates the controller with metrics from a completed commit.
type Metrics ¶
type Metrics struct {
LeafFill float64 // 0..1
Splits int
IndexWriteBytes int
SlabWriteBytes int
SlabDeadBytes int
// SlabWriteBytesByFile tracks bytes appended to each slab file during this
// commit (keyed by FileID).
SlabWriteBytesByFile map[uint32]int64
// SlabDeadBytesByFile tracks bytes that became dead in each slab file during
// this commit due to overwrite/delete of pointer values.
SlabDeadBytesByFile map[uint32]int64
}
Metrics represents the telemetry gathered during a single commit.
Click to show internal directories.
Click to hide internal directories.