Documentation ¶
Overview ¶
Package workflow contains const and types to invoke Workflows.
Index ¶
Constants ¶
const ( Bisect = "perf.bisect" BuildChrome = "perf.build_chrome" CatapultBisect = "perf.catapult.bisect" ConvertToCatapultResponseWorkflow = "perf.catapult.response" RunBenchmark = "perf.run_benchmark" SingleCommitRunner = "perf.single_commit_runner" PairwiseCommitsRunner = "perf.pairwise_commits_runner" PairwiseWorkflow = "perf.pairwise" BugUpdate = "perf.bug_update" )
Workflow name definitions.
Those are used to invoke the workflows. This is meant to decouple the souce code dependencies such that the client doesn't need to link with the actual implementation. TODO(b/326352379): introduce a specific type to encapsulate these workflow names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BisectParams ¶
type BisectParams struct { // BisectWorkflow reuses BisectRequest message Request *pb.ScheduleBisectRequest // Available bot list BotIds []string }
func (*BisectParams) GetImprovementDirection ¶
func (bp *BisectParams) GetImprovementDirection() compare.ImprovementDir
GetImprovementDirection returns the improvement direction.
Returns Unknown by default regardless of input.
func (*BisectParams) GetInitialAttempt ¶
func (bp *BisectParams) GetInitialAttempt() int32
GetInitialAttempt returns the initial attempt as int32.
If the given string value is invalid or unable to parse, it returns the default 0.
func (*BisectParams) GetMagnitude ¶
func (bp *BisectParams) GetMagnitude() float64
GetMagnitude returns the magnitude as float64.
If the given string value is invalid or unable to parse, it returns the default 1.0.
type Build ¶
type Build struct { // The parameters used to make this build. BuildChromeParams // ID is the buildbucket ID of the Chrome build. // https://github.com/luci/luci-go/blob/19a07406e/buildbucket/proto/build.proto#L138 ID int64 // Status is the status of the build, this is needed to surface the build failures. Status buildbucketpb.Status // CAS is the CAS address of the build isolate. CAS *swarmingV1.SwarmingRpcsCASReference }
Build stores the build from Buildbucket.
type BuildChromeParams ¶
type BuildChromeParams struct { // WorkflowID is arbitrary string that tags the build. // This is used to connect the downstream and know which build is used. // This is usually the pinpoint job ID. WorkflowID string // Commit is the chromium commit hash. Commit *midpoint.CombinedCommit // Device is the name of the device, e.g. "linux-perf". Device string // Target is name of the build isolate target // e.g. "performance_test_suite". Target string // Patch is the Gerrit patch included in the build. Patch []*buildbucketpb.GerritChange }
Workflow params definitions.
Each workflow defines its own struct for the params, this will ensure the input parameter type safety, as well as expose them in a structured way.
type PairwiseParams ¶
type PairwiseParams struct { // PairwiseWorkflow reuses SchedulePairwiseRequest proto request Request *pb.SchedulePairwiseRequest }
func (*PairwiseParams) GetImprovementDirection ¶
func (pp *PairwiseParams) GetImprovementDirection() compare.ImprovementDir
GetImprovementDirection returns the improvement direction.
Returns Unknown by default.
func (*PairwiseParams) GetInitialAttempt ¶
func (pp *PairwiseParams) GetInitialAttempt() int32
GetInitialAttempt returns the initial attempt as int32.
Pairwise analysis needs to run an even number of commits to ensure an equal number of pairs where commit A goes first and commit B goes first. If the given string value is invalid or unable to parse, it returns the default 30.
type TestRun ¶
type TestRun struct { // TaskID is the swarming task ID. TaskID string // Status is the swarming task status. Status run_benchmark.State // CAS is the CAS address of the test output. CAS *swarmingV1.SwarmingRpcsCASReference // Values is sampled values for each benchmark story. Values map[string][]float64 }
TestRun stores individual benchmark test run.