Documentation ¶
Index ¶
- Constants
- func IsAWSDeploymentError(error string) bool
- func UrlBasePath(u *url.URL) string
- type AnalyzerClient
- type BenchmarkAgentClient
- type BenchmarkAgentResponse
- type BenchmarkControllerBenchmarkResponse
- type BenchmarkControllerCalibrationResponse
- type BenchmarkControllerClient
- func (client *BenchmarkControllerClient) RunBenchmark(loadTesterName string, baseUrl string, stageId string, intensity float64, ...) (*BenchmarkControllerBenchmarkResponse, error)
- func (client *BenchmarkControllerClient) RunCalibration(loadTesterName string, baseUrl string, stageId string, ...) (*BenchmarkControllerCalibrationResponse, error)
- type DeployerClient
- func (client *DeployerClient) CreateDeployment(deployment *deployer.Deployment, loadTesterName string, log *logging.Logger) (string, error)
- func (client *DeployerClient) CreateDeploymentWithTemplate(deploymentTemplate string, deployment *deployer.Deployment, ...) (string, error)
- func (client *DeployerClient) DeleteDeployment(deploymentId string, log *logging.Logger) error
- func (client *DeployerClient) DeployExtensions(deploymentTemplate string, deploymentId string, ...) error
- func (client *DeployerClient) GetColocatedServiceUrls(deployment string, colocatedServicePrefix string, targetServicePrefix string, ...) ([]string, error)
- func (client *DeployerClient) GetServiceAddress(deployment string, service string, log *logging.Logger) (*ServiceAddress, error)
- func (client *DeployerClient) GetServiceUrl(deployment string, service string, log *logging.Logger) (string, error)
- func (client *DeployerClient) GetServiceUrls(deployment string, servicePrefix string, log *logging.Logger) ([]string, error)
- func (client *DeployerClient) GetSupportedAWSInstances(region string, availabilityZone string) ([]string, error)
- func (client *DeployerClient) IsDeploymentReady(deployment string) (bool, error)
- func (client *DeployerClient) ResetTemplateDeployment(deploymentTemplate string, deploymentId string, log *logging.Logger) error
- type DeployerResponse
- type DeploymentCache
- type DeploymentStateResponse
- type GetNextInstanceTypesRequest
- type GetNextInstanceTypesResponse
- type GetSupportedAWSInstancesResponse
- type InfluxClient
- type InstanceResult
- type ServiceAddress
- type ServiceMapping
- type ServiceMappingResponse
- type SlowCookerBenchmarkRequest
- type SlowCookerBenchmarkResponse
- type SlowCookerBenchmarkResult
- type SlowCookerCalibrateRequest
- type SlowCookerCalibrateResponse
- type SlowCookerCalibrateResult
- type SlowCookerClient
- type SlowCookerSLO
Constants ¶
View Source
const (
ErrAWSError = "Unable to run ec2"
)
Variables ¶
This section is empty.
Functions ¶
func IsAWSDeploymentError ¶
func UrlBasePath ¶
Types ¶
type AnalyzerClient ¶
func NewAnalyzerClient ¶
func NewAnalyzerClient(config *viper.Viper) (*AnalyzerClient, error)
func (*AnalyzerClient) GetNextInstanceTypes ¶
func (client *AnalyzerClient) GetNextInstanceTypes( runId string, appName string, results map[string]float64, logger *logging.Logger) ([]string, error)
GetNextInstanceTypes asks the analyzer if we should run more benchmark runs on different vm instance types or not. If the return array is empty, then the analyzer has found the optimal choice.
type BenchmarkAgentClient ¶
type BenchmarkAgentClient struct{}
func NewBenchmarkAgentClient ¶
func NewBenchmarkAgentClient() *BenchmarkAgentClient
func (*BenchmarkAgentClient) CreateBenchmark ¶
func (client *BenchmarkAgentClient) CreateBenchmark( baseUrl string, benchmark *models.Benchmark, config *models.BenchmarkConfig, intensity int, logger *logging.Logger) error
func (*BenchmarkAgentClient) DeleteBenchmark ¶
func (client *BenchmarkAgentClient) DeleteBenchmark(baseUrl string, benchmarkName string, logger *logging.Logger) error
type BenchmarkAgentResponse ¶
type BenchmarkControllerCalibrationResponse ¶
type BenchmarkControllerCalibrationResponse struct { Status string `json:"status"` Error string `json:"error"` Results struct { RunResults []struct { Results map[string]interface{} `json:"results"` IntensityArgs map[string]interface{} `json:"intensityArgs"` } `json:"runResults"` FinalResults struct { IntensityArgs map[string]interface{} `json:"intensityArgs"` Qos float64 `json:"qos"` } `json:"finalResults"` } `json:"results"` }
type BenchmarkControllerClient ¶
type BenchmarkControllerClient struct{}
func (*BenchmarkControllerClient) RunBenchmark ¶
func (client *BenchmarkControllerClient) RunBenchmark( loadTesterName string, baseUrl string, stageId string, intensity float64, controller *models.BenchmarkController, logger *logging.Logger) (*BenchmarkControllerBenchmarkResponse, error)
func (*BenchmarkControllerClient) RunCalibration ¶
func (client *BenchmarkControllerClient) RunCalibration( loadTesterName string, baseUrl string, stageId string, controller *models.BenchmarkController, slo models.SLO, logger *logging.Logger) (*BenchmarkControllerCalibrationResponse, error)
type DeployerClient ¶
type DeployerClient struct { Cache map[string]*DeploymentCache Url *url.URL }
func NewDeployerClient ¶
func NewDeployerClient(config *viper.Viper) (*DeployerClient, error)
func (*DeployerClient) CreateDeployment ¶
func (client *DeployerClient) CreateDeployment( deployment *deployer.Deployment, loadTesterName string, log *logging.Logger) (string, error)
func (*DeployerClient) CreateDeploymentWithTemplate ¶
func (client *DeployerClient) CreateDeploymentWithTemplate( deploymentTemplate string, deployment *deployer.Deployment, loadTesterName string, log *logging.Logger) (string, error)
func (*DeployerClient) DeleteDeployment ¶
func (client *DeployerClient) DeleteDeployment(deploymentId string, log *logging.Logger) error
func (*DeployerClient) DeployExtensions ¶
func (client *DeployerClient) DeployExtensions( deploymentTemplate string, deploymentId string, deployment *deployer.Deployment, loadTesterName string, log *logging.Logger) error
func (*DeployerClient) GetColocatedServiceUrls ¶
func (client *DeployerClient) GetColocatedServiceUrls( deployment string, colocatedServicePrefix string, targetServicePrefix string, log *logging.Logger) ([]string, error)
GetColocatedServiceUrls finds the service's urls that's running on the same nodes where colocatedService is running. We don't specify exact service names because services that has multiple copies will be named differently but sharing the same prefix (e.g: benchmark-agent, benchmark-agent-2, etc.).
func (*DeployerClient) GetServiceAddress ¶
func (client *DeployerClient) GetServiceAddress(deployment string, service string, log *logging.Logger) (*ServiceAddress, error)
GetServiceAddress return the address object of service container
func (*DeployerClient) GetServiceUrl ¶
func (*DeployerClient) GetServiceUrls ¶
func (*DeployerClient) GetSupportedAWSInstances ¶
func (client *DeployerClient) GetSupportedAWSInstances(region string, availabilityZone string) ([]string, error)
func (*DeployerClient) IsDeploymentReady ¶
func (client *DeployerClient) IsDeploymentReady(deployment string) (bool, error)
func (*DeployerClient) ResetTemplateDeployment ¶
type DeployerResponse ¶
type DeploymentCache ¶
type DeploymentCache struct { ServiceMapping *ServiceMappingResponse ServiceUrls map[string]string ServiceAddresses map[string]*ServiceAddress }
type DeploymentStateResponse ¶
type GetNextInstanceTypesRequest ¶
type GetNextInstanceTypesRequest struct { AppName string `json:"appName"` Data []InstanceResult `json:"data"` }
type InfluxClient ¶
func NewInfluxClient ¶
type InstanceResult ¶
type ServiceAddress ¶
type ServiceAddress struct { Host string `bson:"host,omitempty" json:"host,omitempty"` Port int64 `bson:"port,omitempty" json:"port,omitempty"` }
ServiceAddress GetServiceUrl return this object
type ServiceMapping ¶
type ServiceMappingResponse ¶
type ServiceMappingResponse struct { Data map[string]ServiceMapping Error bool }
type SlowCookerBenchmarkRequest ¶
type SlowCookerBenchmarkRequest struct { LoadTime string `json:"loadTime"` RunsPerIntensity int `json:"runsPerIntensity"` AppLoad *models.SlowCookerAppLoad `json:"appLoad"` }
func (SlowCookerBenchmarkRequest) PrintVerbose ¶
func (request SlowCookerBenchmarkRequest) PrintVerbose(logger *logging.Logger)
type SlowCookerBenchmarkResponse ¶
type SlowCookerBenchmarkResponse struct { Id string `json:"id"` Error string `json:"error"` State string `json:"state"` Results []SlowCookerBenchmarkResult `json:"results"` }
type SlowCookerCalibrateRequest ¶
type SlowCookerCalibrateRequest struct { Calibrate *models.SlowCookerCalibrate `json:"calibrate"` SLO *SlowCookerSLO `json:"slo"` AppLoad *models.SlowCookerAppLoad `json:"appLoad"` LoadTime string `json:"loadTime"` }
func (SlowCookerCalibrateRequest) PrintVerbose ¶
func (request SlowCookerCalibrateRequest) PrintVerbose(logger *logging.Logger)
type SlowCookerCalibrateResponse ¶
type SlowCookerCalibrateResponse struct { Id string `json:"id"` Results []*SlowCookerCalibrateResult `json:"results"` FinalResult *SlowCookerCalibrateResult `json:"finalResult"` FinalConcurrency int `json:"finalConcurrency"` Error string `json:"error"` State string `json:"state"` }
type SlowCookerClient ¶
type SlowCookerClient struct{}
func (*SlowCookerClient) RunBenchmark ¶
func (client *SlowCookerClient) RunBenchmark( baseUrl string, runId string, appIntensity float64, runsPerIntensity int, controller *models.SlowCookerController, logger *logging.Logger, waitResults bool) (*SlowCookerBenchmarkResponse, error)
func (*SlowCookerClient) RunCalibration ¶
func (client *SlowCookerClient) RunCalibration( baseUrl string, runId string, slo models.SLO, controller *models.SlowCookerController, logger *logging.Logger) (*SlowCookerCalibrateResponse, error)
type SlowCookerSLO ¶
Click to show internal directories.
Click to hide internal directories.