Documentation
¶
Index ¶
Constants ¶
View Source
const ( MB = 1024 * 1024 GB = 1024 * MB // Size thresholds from PLAN.md SmallDatapointLimit = 100 // datapoints SmallSizeLimit = 10 * MB // 10MB MediumSizeLimit = 100 * MB // 100MB LargeSizeLimit = 1 * GB // 1GB MaxAggregateSize = 5 * GB // 5GB // Minimum dataranges to aggregate for small datapoints MinDatarangesForSmallAggregation = 10 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datarange ¶ added in v0.1.16
type Datarange struct {
ID int64
MinDatapointKey int64
MaxDatapointKey int64
SizeBytes int64
DatapointCount int64
}
Datarange represents a datarange with its metadata
type Operation ¶ added in v0.1.16
type Operation struct {
Type OptimizationType
DatarangeIDs []int64
FirstDatapoint uint64
LastDatapoint uint64
TotalSize int64
Reason string
}
Operation represents an optimization operation to perform
type OptimizationType ¶ added in v0.1.16
type OptimizationType string
OptimizationType describes the type of optimization
const ( OptimizationSmallDatapoints OptimizationType = "Small Datapoints Aggregation" OptimizationSmallToMedium OptimizationType = "Small to Medium Size Aggregation" OptimizationMediumToLarge OptimizationType = "Medium to Large Size Aggregation" OptimizationLargeToVeryLarge OptimizationType = "Large to Very Large Size Aggregation" )
type Optimizer ¶ added in v0.1.16
type Optimizer struct {
// contains filtered or unexported fields
}
Optimizer handles optimization logic
func NewOptimizer ¶ added in v0.1.16
func NewOptimizer(dataranges []client.DatarangeInfo) *Optimizer
NewOptimizer creates a new optimizer from datarange info
func (*Optimizer) FindBestOptimization ¶ added in v0.1.16
FindBestOptimization finds the best optimization according to priority rules
Click to show internal directories.
Click to hide internal directories.