updater

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendMetric

func AppendMetric(metric *state.Metric, idx int32, value float64)

AppendMetric adds the value at index to metric.

Handles the details of sparse-encoding the results. Indices must be monotonically increasing for the same metric.

func AppendResult

func AppendResult(row *state.Row, rowResult Row, count int)

AppendResult adds the rowResult column to the row.

Handles the details like missing fields and run-length-encoding the result.

func Days

func Days(d float64) time.Duration

Days converts days float into a time.Duration, assuming a 24 hour day.

A day is not always 24 hours due to things like leap-seconds. We do not need this level of precision though, so ignore the complexity.

func FindMetric

func FindMetric(row *state.Row, name string) *state.Metric

FindMetric returns the first metric with the specified name.

func Headers

func Headers(group configpb.TestGroup) []string

Headers returns the list of ColumnHeader ConfigurationValues for this group.

func Update

func Update(client *storage.Client, ctx context.Context, path gcs.Path, groupConcurrency int, buildConcurrency int, confirm bool, groupTimeout time.Duration, buildTimeout time.Duration, group string)

Types

type Build

type Build = gcs.Build

Build holds data to builds stored in GCS.

type Builds

type Builds = gcs.Builds

Builds holds a slice of builds, which will sort naturally (aka 2 < 10).

type Column

type Column struct {
	ID       string
	Started  int64
	Finished int64
	Passed   bool
	Rows     map[string][]Row
	Metadata ColumnMetadata
	Version  string
}

Column represents a build run, which includes one or more row results and metadata.

func (Column) Overall

func (br Column) Overall() Row

Overall calculates the generated-overall row value for the current column

type ColumnMetadata

type ColumnMetadata map[string]string

ColumnMetadata holds key => value mapping of metadata info.

type Row

type Row struct {
	Result   state.Row_Result
	Metrics  map[string]float64
	Metadata map[string]string
	Message  string
	Icon     string
}

Row holds results for a piece of a build run, such as a test result.

func (Row) Format

func (r Row) Format(config nameConfig, meta map[string]string) string

Format renders any requested metadata into the name

type Rows

type Rows []*state.Row

Rows is a slice of Row pointers

func (Rows) Len

func (r Rows) Len() int

func (Rows) Less

func (r Rows) Less(i, j int) bool

func (Rows) Swap

func (r Rows) Swap(i, j int)

Jump to

Keyboard shortcuts

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