runners

package
v0.0.0-...-4785ff0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNNING  = 0
	FAILED   = 1
	FINISHED = 2
)

Possible all instance run states

Variables

This section is empty.

Functions

func GetStateString

func GetStateString(state instanceRunState) string

func ParseStateString

func ParseStateString(state string) instanceRunState

Types

type AWSSizingAllInstancesRun

type AWSSizingAllInstancesRun struct {
	AWSSizingRun

	NodeTypeConfig      *models.AWSRegionNodeTypeConfig
	PreviousGenerations []string
}

func NewAWSSizingAllInstancesRun

func NewAWSSizingAllInstancesRun(
	jobManager *jobs.JobManager,
	applicationConfig *models.ApplicationConfig,
	config *viper.Viper,
	nodeTypeConfig *models.AWSRegionNodeTypeConfig,
	previousGenerations []string,
	allInstances bool,
	skipUnreserveOnFailure bool) (*AWSSizingAllInstancesRun, error)

func (*AWSSizingAllInstancesRun) Run

func (run *AWSSizingAllInstancesRun) Run(deploymentId string) error

type AWSSizingInstancesRun

type AWSSizingInstancesRun struct {
	AWSSizingRun

	Instances []string
}

func NewAWSSizingInstancesRun

func NewAWSSizingInstancesRun(
	jobManager *jobs.JobManager,
	applicationConfig *models.ApplicationConfig,
	config *viper.Viper,
	instances []string,
	skipUnreserveOnFailure bool) (*AWSSizingInstancesRun, error)

func (*AWSSizingInstancesRun) Run

func (run *AWSSizingInstancesRun) Run(deploymentId string) error

type AWSSizingRun

type AWSSizingRun struct {
	ProfileRun

	Config         *viper.Viper
	JobManager     *jobs.JobManager
	AnalyzerClient *clients.AnalyzerClient
}

AWSSizingRun is the overall app request for find best instance type in AWS. It spawns multiple AWSSizingSingleRun based on analyzer recommendations. Note that AWSSizingRun doesn't implement the job interface, and won't be queued up to the job manager to run.

func NewAWSSizingRun

func NewAWSSizingRun(
	jobManager *jobs.JobManager,
	applicationConfig *models.ApplicationConfig,
	config *viper.Viper,
	skipUnreserveOnFailure bool) (*AWSSizingRun, error)

func (*AWSSizingRun) GetResults

func (run *AWSSizingRun) GetResults() <-chan *jobs.JobResults

func (*AWSSizingRun) Run

func (run *AWSSizingRun) Run(deploymentId string) error

func (*AWSSizingRun) SetFailed

func (run *AWSSizingRun) SetFailed(error string)

type AWSSizingSingleRun

type AWSSizingSingleRun struct {
	ProfileRun

	InstanceType string
	Calibration  *models.CalibrationResults
	ResultsChan  chan *jobs.JobResults
}

AWSSizingSingleRun represents a single benchmark run for a particular AWS instance type.

func NewAWSSizingSingleRun

func NewAWSSizingSingleRun(
	id string,
	instanceType string,
	calibration *models.CalibrationResults,
	applicationConfig *models.ApplicationConfig,
	config *viper.Viper,
	SkipUnreserveOnFailure bool) (*AWSSizingSingleRun, error)

func (*AWSSizingSingleRun) GetJobDeploymentConfig

func (run *AWSSizingSingleRun) GetJobDeploymentConfig() jobs.JobDeploymentConfig

func (*AWSSizingSingleRun) GetResults

func (run *AWSSizingSingleRun) GetResults() <-chan *jobs.JobResults

func (*AWSSizingSingleRun) GetSummary

func (run *AWSSizingSingleRun) GetSummary() jobs.JobSummary

func (*AWSSizingSingleRun) Run

func (run *AWSSizingSingleRun) Run(deploymentId string) error

func (*AWSSizingSingleRun) SetFailed

func (run *AWSSizingSingleRun) SetFailed(error string)

type AllInstanceRunResults

type AllInstanceRunResults struct {
	RunId       string                      `bson:"runId" json:"runId"`
	Duration    string                      `bson:"duration" json:"duration"`
	AppName     string                      `bson:"appName" json:"appName"`
	TestResults map[string]*InstanceResults `bson:"testResult" json:"testResult"`
}

type BaseBenchmarkRun

type BaseBenchmarkRun struct {
	ProfileRun

	BenchmarkAgentClient *clients.BenchmarkAgentClient
}

func (*BaseBenchmarkRun) GetResults

func (run *BaseBenchmarkRun) GetResults() <-chan *jobs.JobResults

func (*BaseBenchmarkRun) SetFailed

func (run *BaseBenchmarkRun) SetFailed(error string)

type BenchmarkRun

type BenchmarkRun struct {
	BaseBenchmarkRun

	StartingIntensity int
	Step              int
	SloTolerance      float64
	Benchmarks        []models.Benchmark
}

func NewBenchmarkRun

func NewBenchmarkRun(
	applicationConfig *models.ApplicationConfig,
	benchmarks []models.Benchmark,
	startingIntensity int,
	step int,
	sloTolerance float64,
	config *viper.Viper) (*BenchmarkRun, error)

func (*BenchmarkRun) Run

func (run *BenchmarkRun) Run(deploymentId string) error

type CalibrationRun

type CalibrationRun struct {
	ProfileRun
}

func NewCalibrationRun

func NewCalibrationRun(
	applicationConfig *models.ApplicationConfig,
	config *viper.Viper,
	skipUnreserveOnFailure bool) (*CalibrationRun, error)

func (*CalibrationRun) GetResults

func (run *CalibrationRun) GetResults() <-chan *jobs.JobResults

func (*CalibrationRun) Run

func (run *CalibrationRun) Run(deploymentId string) error

func (*CalibrationRun) SetFailed

func (run *CalibrationRun) SetFailed(error string)

type CaptureMetricsRun

type CaptureMetricsRun struct {
	ProfileRun

	Config               *viper.Viper
	ServiceName          string
	LoadTester           models.LoadTester
	Benchmark            *models.Benchmark
	BenchmarkAgentClient *clients.BenchmarkAgentClient
	BenchmarkIntensity   int
	Duration             time.Duration
}

func NewCaptureMetricsRun

func NewCaptureMetricsRun(
	applicationConfig *models.ApplicationConfig,
	serviceName string,
	loadTester models.LoadTester,
	benchmark *models.Benchmark,
	benchmarkIntensity int,
	duration time.Duration,
	skipUnreserveOnFailure bool,
	config *viper.Viper) (*CaptureMetricsRun, error)

func (*CaptureMetricsRun) GetResults

func (run *CaptureMetricsRun) GetResults() <-chan *jobs.JobResults

func (*CaptureMetricsRun) Run

func (run *CaptureMetricsRun) Run(deploymentId string) error

func (*CaptureMetricsRun) SetFailed

func (run *CaptureMetricsRun) SetFailed(error string)

type InstanceResults

type InstanceResults struct {
	State    string  `bson:"state" json:"state"`
	QosValue float64 `bson:"qosValue" json:"qosValue"`
}

type ProfileResults

type ProfileResults struct {
	Id           string
	StageResults []StageResult
}

type ProfileRun

type ProfileRun struct {
	Id                        string
	DeployerClient            *clients.DeployerClient
	BenchmarkControllerClient *clients.BenchmarkControllerClient
	SlowCookerClient          *clients.SlowCookerClient
	DeploymentId              string
	MetricsDB                 *db.MetricsDB
	ApplicationConfig         *models.ApplicationConfig
	ProfileLog                *log.FileLog
	State                     string
	Created                   time.Time
	SkipUnreserveOnFailure    bool
	DirectJob                 bool
}

func (*ProfileRun) GetApplicationConfig

func (run *ProfileRun) GetApplicationConfig() *models.ApplicationConfig

func (*ProfileRun) GetColocatedAgentUrls

func (run *ProfileRun) GetColocatedAgentUrls(agent string, service string, placementHost string) ([]string, error)

func (*ProfileRun) GetId

func (run *ProfileRun) GetId() string

func (*ProfileRun) GetJobDeploymentConfig

func (run *ProfileRun) GetJobDeploymentConfig() jobs.JobDeploymentConfig

func (*ProfileRun) GetLog

func (run *ProfileRun) GetLog() *log.FileLog

func (*ProfileRun) GetState

func (run *ProfileRun) GetState() string

func (*ProfileRun) GetSummary

func (run *ProfileRun) GetSummary() jobs.JobSummary

func (*ProfileRun) IsDirectJob

func (run *ProfileRun) IsDirectJob() bool

func (*ProfileRun) IsSkipUnreserveOnFailure

func (run *ProfileRun) IsSkipUnreserveOnFailure() bool

func (*ProfileRun) SetState

func (run *ProfileRun) SetState(state string)

type SizeRunResults

type SizeRunResults struct {
	InstanceType string
	RunId        string
	Duration     string
	AppName      string
	QosValue     models.SLO
}

type StageResult

type StageResult struct {
	Id        string
	StartTime string
	EndTime   string
}

Jump to

Keyboard shortcuts

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