job

package
v0.0.0-...-c9cfaf6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package job provides a schema for describing benchmark jobs.

Index

Constants

View Source
const SkipTests = "none^"

SkipTests is a tests regular expression that will cause no tests to be run.

Variables

This section is empty.

Functions

func Marshal

func Marshal(j *Job) ([]byte, error)

Types

type Job

type Job struct {
	Toolchain Toolchain `json:"toolchain"`
	Suites    []Suite   `json:"suite"`
}

func Unmarshal

func Unmarshal(b []byte) (*Job, error)

type Module

type Module struct {
	Path    string `json:"path"`
	Version string `json:"version"`
}

func (Module) IsMeta

func (m Module) IsMeta() bool

IsMeta reports whether m is a special-case module such as the standard library.

func (Module) String

func (m Module) String() string

type Suite

type Suite struct {
	Module     Module        `json:"module"`
	Tests      string        `json:"tests,omitempty"`
	Short      bool          `json:"short,omitempty"`
	Benchmarks string        `json:"benchmarks,omitempty"`
	BenchTime  time.Duration `json:"benchtime_ns,omitempty"`
	Timeout    time.Duration `json:"timeout_ns,omitempty"`
}

func (*Suite) BenchmarkRegex

func (s *Suite) BenchmarkRegex() string

BenchmarkRegex returns the regular expression controlling which benchmarks are run.

func (*Suite) BenchmarkTime

func (s *Suite) BenchmarkTime() time.Duration

BenchmarkTime returns the minimum amount of time each benchmark is run for.

func (*Suite) TestRegex

func (s *Suite) TestRegex() string

TestRegex returns the regular expression controlling which tests are run.

type Toolchain

type Toolchain struct {
	Type   string            `json:"type"`
	Params map[string]string `json:"params"`
}

Jump to

Keyboard shortcuts

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