percentile

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProcessorName = "percentile"
	// DefaultConcurrentTaskNum is num of default concurrent task
	DefaultConcurrentTaskNum      = 100
	DefaultPercentile             = 0.9
	DefaultGarbageCollectInterval = 1 * time.Hour
	ExceptionRequeueBaseDelay     = time.Minute
	ExceptionRequeueMaxDelay      = 30 * time.Minute
)

Variables

Functions

func NewContext

func NewContext() context.Context

func NewProcessor

func NewProcessor(datasourceProxy *datasource.Proxy, lister v1alpha1.ResourceRecommendLister) processor.Processor

Types

type Processor

type Processor struct {
	Lister v1alpha1.ResourceRecommendLister

	DatasourceProxy *datasource.Proxy

	TaskQueue workqueue.RateLimitingInterface

	AggregateTasks *sync.Map

	// Stores taskID corresponding to Metrics in the ResourceRecommend
	ResourceRecommendTaskIDsMap map[types.NamespacedName]*map[datasourcetypes.Metric]processortypes.TaskID
	// contains filtered or unexported fields
}

func (*Processor) Cancel

func (p *Processor) Cancel(processKey *processortypes.ProcessKey) (cErr *errortypes.CustomError)

func (*Processor) GarbageCollector

func (p *Processor) GarbageCollector(ctx context.Context)

func (*Processor) ProcessTasks

func (p *Processor) ProcessTasks(ctx context.Context)

func (*Processor) QueryProcessedValues

func (p *Processor) QueryProcessedValues(processKey *processortypes.ProcessKey) (float64, error)

func (*Processor) Register

func (p *Processor) Register(processConfig *processortypes.ProcessConfig) (cErr *errortypes.CustomError)

func (*Processor) Run

func (p *Processor) Run(ctx context.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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