common

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Arch string = "unknown"
View Source
var Clock clock = clock{
	Now: time.Now,
}
View Source
var Color color = color{}
View Source
var Commit string = "0000000"
View Source
var DownloadURL string = "https://github.com/fnando/bolt/releases/latest/download/bolt-" + Arch
View Source
var Version string = "0.0.3"

Functions

This section is empty.

Types

type Aggregation

type Aggregation struct {
	BenchmarksMap     map[string]*Benchmark
	CoverageCount     int
	CoverageMap       map[string]*Coverage
	CoverageThreshold float64
	OrphanOutput      []string
	SlowestCount      int
	SlowestThreshold  time.Duration
	TestsMap          map[string]*Test

	StartedAt time.Time
	EndedAt   time.Time
}

func (Aggregation) Benchmarks

func (agg Aggregation) Benchmarks() []*Benchmark

func (Aggregation) CountBy

func (agg Aggregation) CountBy(status string) int

func (Aggregation) Coverages

func (agg Aggregation) Coverages() []*Coverage

func (Aggregation) Elapsed

func (agg Aggregation) Elapsed() time.Duration

func (Aggregation) SlowestTests

func (agg Aggregation) SlowestTests() []*Test

func (Aggregation) Status

func (agg Aggregation) Status() string

func (Aggregation) Tests

func (agg Aggregation) Tests() []*Test

func (Aggregation) TestsCount

func (agg Aggregation) TestsCount() int

type Benchmark

type Benchmark struct {
	Name                 string
	Package              string
	Key                  string `json:"-"`
	Processors           int
	Iterations           int
	DurationPerOperation time.Duration
}

type Coverage

type Coverage struct {
	Package  string
	Coverage float64
}

type Output

type Output struct {
	Stdout io.Writer
	Stderr io.Writer
}

type Stream

type Stream struct {
	Action  string
	Elapsed float64
	Output  string
	Package string
	Test    string
	Time    string
}

type StreamConsumer

type StreamConsumer struct {
	Aggregation *Aggregation
	OnData      func(data string)
	OnProgress  func(test Test)
	OnFinished  func(aggregation *Aggregation)
}

func (StreamConsumer) Ingest

func (consumer StreamConsumer) Ingest(scanner *bufio.Scanner)

type Test

type Test struct {
	Key             string `json:"-"`
	ErrorTrace      string
	ErrorTraceIndex int `json:"-"`
	Source          string
	ReadableName    string
	Name            string
	StartedAt       time.Time
	EndedAt         time.Time
	Elapsed         time.Duration
	Output          []string
	Status          string
	SkipMessage     string
	Package         string
}

Jump to

Keyboard shortcuts

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