tuning

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Unlicense Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoTuner

type AutoTuner struct {
	// contains filtered or unexported fields
}

func NewAutoTuner

func NewAutoTuner(config AutoTunerConfig, logger *zerolog.Logger) *AutoTuner

func (*AutoTuner) GetAllTunings

func (a *AutoTuner) GetAllTunings() map[string]float64

func (*AutoTuner) GetParameterValue

func (a *AutoTuner) GetParameterValue(name string) float64

func (*AutoTuner) RecordMeasurement

func (a *AutoTuner) RecordMeasurement(paramName string, value, metric float64)

func (*AutoTuner) RegisterParameter

func (a *AutoTuner) RegisterParameter(name string, minVal, maxVal float64, tType TuningType) *TuningParameter

func (*AutoTuner) Start

func (a *AutoTuner) Start(ctx context.Context) error

func (*AutoTuner) Stop

func (a *AutoTuner) Stop() error

type AutoTunerConfig

type AutoTunerConfig struct {
	Enabled        bool
	SampleInterval time.Duration
	MinSamples     int
	Confidence     float64
	LearningRate   float64
}

type Measurement

type Measurement struct {
	Timestamp time.Time
	Parameter string
	Value     float64
	Metric    float64
}

type TuningParameter

type TuningParameter struct {
	Name     string
	MinValue float64
	MaxValue float64
	// contains filtered or unexported fields
}

type TuningType

type TuningType int
const (
	TuningTypeContinuous TuningType = iota
	TuningTypeDiscrete
)

type WorkloadAnalyzer

type WorkloadAnalyzer struct {
	// contains filtered or unexported fields
}

func NewWorkloadAnalyzer

func NewWorkloadAnalyzer(maxSamples int) *WorkloadAnalyzer

func (*WorkloadAnalyzer) Analyze

func (w *WorkloadAnalyzer) Analyze() WorkloadProfile

func (*WorkloadAnalyzer) RecordSample

func (w *WorkloadAnalyzer) RecordSample(rate, latP50, latP99, cpu float64)

type WorkloadProfile

type WorkloadProfile struct {
	Classification   string
	AverageQueryRate float64
}

type WorkloadSample

type WorkloadSample struct {
	Timestamp  time.Time
	QueryRate  float64
	LatencyP50 float64
	LatencyP99 float64
	CPUUsage   float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL