Documentation ¶
Overview ¶
Package run_benchmark runs the benchmark, story, metric as a on a build of chrome via swarming tasks.
Package run_benchmark also supports various utility functions that make it easy to get the performance measuring tasks of a Pinpoint job and check their statuses.
Index ¶
- Constants
- func Cancel(ctx context.Context, sc backends.SwarmingClient, taskID string) error
- func NewLacrosTest(target, benchmark, browser, commit, story, storyTags string) *lacrosTelemetryTest
- func Run(ctx context.Context, sc backends.SwarmingClient, ...) ([]*apipb.TaskRequestMetadataResponse, error)
- type BenchmarkTest
- type RunBenchmarkRequest
- type State
Constants ¶
const ExecutionTimeoutSecs = 2700 // 45 min
const PendingTimeoutSecs = 86400 // 1 day
Variables ¶
This section is empty.
Functions ¶
func NewLacrosTest ¶
func NewLacrosTest(target, benchmark, browser, commit, story, storyTags string) *lacrosTelemetryTest
func Run ¶
func Run(ctx context.Context, sc backends.SwarmingClient, commit, bot, benchmark, story, storyTag string, jobID string, buildArtifact *apipb.CASReference, iter int, botID map[string]string) ([]*apipb.TaskRequestMetadataResponse, error)
Run schedules a swarming task to run the RunBenchmarkRequest.
Types ¶
type BenchmarkTest ¶
type BenchmarkTest interface {
GetCommand() []string
}
func NewBenchmarkTest ¶
func NewBenchmarkTest(commit, botConfig, browser, benchmark, story, storyTags string) (BenchmarkTest, error)
NewBenchmarkTest returns a BenchmarkTest based on the request parameters. The Configuration (bot) is used alongside the benchmark to determine the isolate target for that combination. Based on the isolate target,
type RunBenchmarkRequest ¶
type RunBenchmarkRequest struct { // the Pinpoint job id JobID string // the swarming instance and cas digest hash and bytes location for the build Build *apipb.CASReference // commit hash Commit string // device configuration BotConfig string // benchmark to test Benchmark string // story to test Story string // story tags for the test StoryTags string // test target of the job Target string }
A RunBenchmarkRequest defines the request arguments of the performance test to swarming. Note: This is being used in workflows/internal/run_benchmark.go.
type State ¶
type State string
func (State) IsNoResource ¶
IsNoResource checks if a swarming task state has state NO_RESOURCE
func (State) IsTaskBenchmarkFailure ¶
IsTaskBenchmarkFailure checks if a swarming task state is a completed run benchmark failure
func (State) IsTaskFinished ¶
IsTaskFinished checks if a swarming task state is finished
func (State) IsTaskPending ¶
IsTaskPending checks if a swarming task state is still pending
func (State) IsTaskSuccessful ¶
IsTaskSuccessful checks if a swarming task state is successful
func (State) IsTaskTerminalFailure ¶
IsTaskTerminalFailure checks if a swarming task state is a terminal failure - swarming task did not complete benchmark execution due to a failure