Documentation ¶
Index ¶
- Constants
- func CountMacroBenchmark(client storage.SQLClient, gitRef, source, typeOf, status, planner string) (int, error)
- func DeleteExecution(client storage.SQLClient, gitRef, UUID, source string) error
- func Exists(client storage.SQLClient, gitRef, source, typeOf, status string) (bool, error)
- func GetFinishedExecution(client storage.SQLClient, gitRef, source, benchmarkType, plannerVersion string, ...) (string, error)
- func GetLatestDailyJobForMacrobenchmarks(client storage.SQLClient) (gitSha string, err error)
- func GetLatestDailyJobForMicrobenchmarks(client storage.SQLClient) (gitSha string, err error)
- func GetPreviousFromSourceMacrobenchmark(client storage.SQLClient, source, typeOf, plannerVersion, gitRef string) (execUUID, gitRefOut string, err error)
- func GetPreviousFromSourceMicrobenchmark(client storage.SQLClient, source, gitRef string) (execUUID, gitRefOut string, err error)
- func GetPullRequestInfo(client storage.SQLClient, pullNumber int) (pullRequestInfo, error)
- func GetPullRequestList(client storage.SQLClient) ([]int, error)
- func IsLastExecutionFinished(client storage.SQLClient) (bool, error)
- type BenchmarkStats
- type Exec
- func (e *Exec) AddToCommand(cmd *cobra.Command)
- func (e *Exec) AddToViper(v *viper.Viper) (err error)
- func (e *Exec) Execute() (err error)
- func (e Exec) ExecuteWithTimeout(timeout time.Duration) (err error)
- func (e *Exec) Prepare() error
- func (e *Exec) SetOutputToDefaultPath() error
- func (e *Exec) SetStderr(stderr *os.File)
- func (e *Exec) SetStdout(stdout *os.File)
- func (e *Exec) Success() error
Constants ¶
const ( ErrorNotPrepared = "exec is not prepared" ErrorExecutionTimeout = "execution timeout" )
const ( MaximumBenchmarkWithSameConfig = 10 SourceCron = "cron" SourcePullRequest = "cron_pr" SourcePullRequestBase = "cron_pr_base" SourceTag = "cron_tags_" SourceReleaseBranch = "cron_" VitessLatestVersion = "latest" VitessPreviousVersion = "v_" )
const ( StatusCreated = "created" StatusStarted = "started" StatusFailed = "failed" StatusFinished = "finished" )
Variables ¶
This section is empty.
Functions ¶
func CountMacroBenchmark ¶
func DeleteExecution ¶
func GetFinishedExecution ¶
func GetLatestDailyJobForMacrobenchmarks ¶
GetLatestDailyJobForMacrobenchmarks will fetch and return the commit sha for which the last daily job for macrobenchmarks was run
func GetLatestDailyJobForMicrobenchmarks ¶
GetLatestDailyJobForMicrobenchmarks will fetch and return the commit sha for which the last daily job for microbenchmarks was run
func GetPreviousFromSourceMacrobenchmark ¶
func GetPreviousFromSourceMacrobenchmark(client storage.SQLClient, source, typeOf, plannerVersion, gitRef string) (execUUID, gitRefOut string, err error)
GetPreviousFromSourceMacrobenchmark gets the previous execution from the same source with the sane plannerVersion for macrobenchmarks
func GetPreviousFromSourceMicrobenchmark ¶
func GetPreviousFromSourceMicrobenchmark(client storage.SQLClient, source, gitRef string) (execUUID, gitRefOut string, err error)
GetPreviousFromSourceMicrobenchmark gets the previous execution from the same source for microbenchmarks
func GetPullRequestInfo ¶
Types ¶
type BenchmarkStats ¶
func GetBenchmarkStats ¶
func GetBenchmarkStats(client storage.SQLClient) (BenchmarkStats, error)
type Exec ¶
type Exec struct { UUID uuid.UUID RawUUID string AnsibleConfig ansible.Config Source string GitRef string VitessVersion git.Version VitessVersionName string // NextBenchmarkIsTheSame is set to true if the next benchmark has the same config // as the current one. This allows us to do some optimization in Ansible and speed // up the entire benchmarking process. NextBenchmarkIsTheSame bool // PreviousBenchmarkIsTheSame is set to true if the previous benchmark had the same // config as this one. It allows us to skip the preparatory cleanup of the server. PreviousBenchmarkIsTheSame bool // Status defines the status of the execution (canceled, finished, failed, etc) Status string StartedAt *time.Time FinishedAt *time.Time // Defines the type of execution (oltp, tpcc, micro, ...) TypeOf string // PullNB defines the pull request number linked to this execution. PullNB int PullBaseBranchRef string // VtgatePlannerVersion is the planner version that vtgate is going to use VtgatePlannerVersion string // GolangVersion is the go version to use while executing the benchmark on the remote host GolangVersion string // ServerAddress is the IP address on which the benchmark will be executed. ServerAddress string RepoDir string // contains filtered or unexported fields }
func NewExec ¶
NewExec creates a new *Exec given the string representation of an uuid.UUID. If no UUID is provided, a new one will be generated.
func NewExecWithConfig ¶
NewExecWithConfig will create a new Exec using the NewExec method, and will use viper.Viper to apply the configuration located at pathConfig.
func (*Exec) AddToCommand ¶
func (*Exec) Execute ¶
Execute will provision infra, configure Ansible files, and run the given Ansible config.
func (Exec) ExecuteWithTimeout ¶
ExecuteWithTimeout will call execution's Execute method with the given timeout.
func (*Exec) SetOutputToDefaultPath ¶
SetOutputToDefaultPath sets Exec's outputs to their default files (stdoutFile and stderrFile). If they can't be found in Exec.dirPath, they will be created.