run_benchmark

package
v0.0.0-...-b95a7b5 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

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

View Source
const ExecutionTimeoutSecs = 2700 // 45 min
View Source
const PendingTimeoutSecs = 86400 // 1 day

Variables

This section is empty.

Functions

func Cancel

func Cancel(ctx context.Context, sc backends.SwarmingClient, taskID string) error

Cancel cancels a swarming task.

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

func (s State) IsNoResource() bool

IsNoResource checks if a swarming task state has state NO_RESOURCE

func (State) IsTaskBenchmarkFailure

func (s State) IsTaskBenchmarkFailure() bool

IsTaskBenchmarkFailure checks if a swarming task state is a completed run benchmark failure

func (State) IsTaskFinished

func (s State) IsTaskFinished() bool

IsTaskFinished checks if a swarming task state is finished

func (State) IsTaskPending

func (s State) IsTaskPending() bool

IsTaskPending checks if a swarming task state is still pending

func (State) IsTaskSuccessful

func (s State) IsTaskSuccessful() bool

IsTaskSuccessful checks if a swarming task state is successful

func (State) IsTaskTerminalFailure

func (s State) IsTaskTerminalFailure() bool

IsTaskTerminalFailure checks if a swarming task state is a terminal failure - swarming task did not complete benchmark execution due to a failure

Jump to

Keyboard shortcuts

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