core

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildDate = "?"
View Source
var Name = "go-bench-away"

Substituted at build time using -X linker flag https://pkg.go.dev/cmd/link See Makefile and Goreleaser configuration

View Source
var SHA = "?"
View Source
var Version = "dev"

Functions

This section is empty.

Types

type JobParameters

type JobParameters struct {
	GitRemote       string
	GitRef          string
	TestsSubDir     string
	TestsFilterExpr string
	Reps            uint
	TestMinRuntime  time.Duration
	Timeout         time.Duration
	SkipCleanup     bool
	Username        string
	GoPath          string
	CleanupCmd      string
}

type JobRecord

type JobRecord struct {
	Id         string
	Status     JobStatus
	Parameters JobParameters

	Created   time.Time
	Started   time.Time
	Completed time.Time

	SHA       string
	GoVersion string

	// Artifacts from job execution
	Log     string
	Results string
	Script  string

	WorkerInfo WorkerInfo
}

func LoadJob added in v0.0.3

func LoadJob(data []byte) (*JobRecord, error)

func NewJob added in v0.0.3

func NewJob(params JobParameters) *JobRecord

func (*JobRecord) Bytes added in v0.0.3

func (jr *JobRecord) Bytes() []byte

func (*JobRecord) RunTime added in v0.2.3

func (jr *JobRecord) RunTime() string

func (*JobRecord) SetFinalStatus added in v0.2.3

func (jr *JobRecord) SetFinalStatus(s JobStatus)

func (*JobRecord) SetRunningStatus added in v0.2.3

func (jr *JobRecord) SetRunningStatus()

type JobStatus

type JobStatus int
const (
	Submitted JobStatus = iota
	Running
	Failed
	Succeeded
)

func (JobStatus) Icon added in v0.0.3

func (jr JobStatus) Icon() string

func (JobStatus) String

func (jr JobStatus) String() string

type QueueStatus added in v0.2.3

type QueueStatus struct {
	SubmittedCount uint64
	RunningJob     *JobRecord
}

type WorkerInfo added in v0.2.1

type WorkerInfo struct {
	Hostname string
	Uname    string
	Version  string
}

Jump to

Keyboard shortcuts

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