glbench

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Overview

Package glbench manipulates the test flow of running glbench test binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportTemperature

func ReportTemperature(ctx context.Context, pv *perf.Values, name string) error

ReportTemperature set the current temperature to pv. If there's problem reading the value, it sets -1000 as the temperature.

func Run

func Run(ctx context.Context, outDir string, preValue interface{}, config Config) (resultErr error)

Run runs the glbench binary. outDir specifies the directories to store the results. preValue is the structure given by precondition/fixture for test to access container/environment.

func SaveFailLog

func SaveFailLog(ctx context.Context, dir string)

SaveFailLog actively calls faillog.SaveToDir to save information for future debugging.

Types

type Config

type Config interface {
	SetUp(ctx context.Context) error
	Run(ctx context.Context, preValue interface{}, outDir string) (string, error)
	TearDown(ctx context.Context) error
	IsHasty() bool
}

Config is the interface that setup/runs/teardown the glbench running environment.

type CrosConfig

type CrosConfig struct {
	Hasty bool // If hasty is true, glbench will run in hasty mode.
}

CrosConfig is the config to run in ChromeOS.

func (*CrosConfig) IsHasty

func (config *CrosConfig) IsHasty() bool

IsHasty returns true if the given run should run in hasty mode.

func (*CrosConfig) Run

func (config *CrosConfig) Run(ctx context.Context, preValue interface{}, outDir string) (string, error)

Run runs glbench and returns the output.

func (*CrosConfig) SetUp

func (config *CrosConfig) SetUp(ctx context.Context) error

SetUp initialized the environment to run glbench in ChromeOS.

func (*CrosConfig) TearDown

func (config *CrosConfig) TearDown(ctx context.Context) error

TearDown teardown the environment.

type CrostiniConfig

type CrostiniConfig struct {
	Hasty bool // If hasty is true, glbench will run in hasty mode.
}

CrostiniConfig is the config to run in Crostini.

func (*CrostiniConfig) IsHasty

func (config *CrostiniConfig) IsHasty() bool

IsHasty returns true if the given run should run in hasty mode.

func (*CrostiniConfig) Run

func (config *CrostiniConfig) Run(ctx context.Context, preValue interface{}, outDir string) (string, error)

Run runs glbench and returns the output.

func (*CrostiniConfig) SetUp

func (config *CrostiniConfig) SetUp(ctx context.Context) error

SetUp initialized the environment to run glbench in Crostini.

func (*CrostiniConfig) TearDown

func (config *CrostiniConfig) TearDown(ctx context.Context) error

TearDown teardown the environment.

Jump to

Keyboard shortcuts

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