Documentation
¶
Overview ¶
Package workload provides workload prediction
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheOptimizer ¶
type CacheOptimizer struct {
// contains filtered or unexported fields
}
CacheOptimizer provides intelligent caching
func NewCacheOptimizer ¶
func NewCacheOptimizer() *CacheOptimizer
NewCacheOptimizer creates a cache optimizer
func (*CacheOptimizer) GetHitRate ¶
func (co *CacheOptimizer) GetHitRate() float64
GetHitRate returns the cache hit rate
func (*CacheOptimizer) OptimizeCacheSize ¶
func (co *CacheOptimizer) OptimizeCacheSize(currentSize int, hitRate float64) int
OptimizeCacheSize recommends optimal cache size
func (*CacheOptimizer) RecordHit ¶
func (co *CacheOptimizer) RecordHit()
RecordHit records a cache hit
func (*CacheOptimizer) RecordMiss ¶
func (co *CacheOptimizer) RecordMiss()
RecordMiss records a cache miss
func (*CacheOptimizer) ShouldCache ¶
func (co *CacheOptimizer) ShouldCache(contentSize int, accessFrequency float64) bool
ShouldCache determines if content should be cached
type Predictor ¶
type Predictor struct {
// contains filtered or unexported fields
}
Predictor predicts workload patterns
func (*Predictor) AddData ¶
func (p *Predictor) AddData(data WorkloadData)
AddData adds workload data
func (*Predictor) Predict ¶
func (p *Predictor) Predict(hoursAhead int) WorkloadPrediction
Predict predicts future workload
Click to show internal directories.
Click to hide internal directories.