replayer

package
v0.0.0-...-bc06d7b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultReplayInterval = time.Duration(5 * time.Minute)

Variables

View Source
var ErrNoScenario = errors.New("no-scenario")

Functions

func GetNextReplayEvent

func GetNextReplayEvent(events []gsc.EventInfo, currEventIndex int) (nextEventIndex int, nextEvent gsc.EventInfo)

func GetNodeGroupNameFromMCCName

func GetNodeGroupNameFromMCCName(namespace, mccName string) string

func GetNodeTemplates

func GetNodeTemplates(mccs []gsh.MachineClassInfo, mcds []gsc.MachineDeploymentInfo) (nodeTemplates map[string]gsc.NodeTemplate, err error)

func GetRecordedClusterSnapshot

func GetRecordedClusterSnapshot(dataAccess *db.DataAccess, snapshotNumber int, snapshotID string, runPrevMarkTime, runMarkTime time.Time) (cs gsc.ClusterSnapshot, err error)

func GetReplayScalingRecommenderReportFormat

func GetReplayScalingRecommenderReportFormat(replayCAReportPath string) (reportFormat string, err error)

func NewDefaultReplayer

func NewDefaultReplayer(ctx context.Context, params gsh.ReplayerParams) (gsh.Replayer, error)

Types

type DeltaWork

type DeltaWork struct {
	Number            int
	PriorityClassWork PriorityClassWork
	NamespaceWork     NamespaceWork
	PodWork           PodWork
	DeployParallel    int
}

func (DeltaWork) IsEmpty

func (d DeltaWork) IsEmpty() bool

func (DeltaWork) String

func (d DeltaWork) String() string

type NamespaceWork

type NamespaceWork struct {
	ToCreate sets.Set[string]
	ToDelete sets.Set[string]
}

type PodWork

type PodWork struct {
	// ToDelete has the Pod names to delete
	ToDelete sets.Set[types.NamespacedName]
	ToDeploy []gsc.PodInfo
}

type PriorityClassWork

type PriorityClassWork struct {
	ToDeploy []gsc.PriorityClassInfo
}

type ReplayMode

type ReplayMode int
const ReplayCAMode ReplayMode = 0
const ReplayScalingRecommenderMode ReplayMode = 1

type ScalingRun

type ScalingRun struct {
	BeginIndex int
	EndIndex   int
	BeginTime  time.Time
	EndTime    time.Time
}

func GetNextScalingRun

func GetNextScalingRun(scaleUpEvents []gsc.EventInfo, lastRun ScalingRun, runInterval time.Duration) (run ScalingRun)

func (ScalingRun) Equal

func (sr ScalingRun) Equal(o ScalingRun) bool

func (ScalingRun) IsZero

func (sr ScalingRun) IsZero() bool

Jump to

Keyboard shortcuts

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