results

package
v0.0.0-...-2b80fd9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package results defines the interface for loading trybot results.

Several types in this file have TryBot prefixes because they are exported via go2ts and this avoids name conflicts in TypeScript.

Index

Constants

This section is empty.

Variables

View Source
var AllRequestKind = []Kind{
	TryBot,
	Commit,
}

AllRequestKind is a list of all possible values of type RequestKind.

Functions

This section is empty.

Types

type Kind

type Kind string

Kind is the type of results we are requesting. The request will be either for trybot data, or for a specific commit that's already landed.

const (
	// TryBot is a request to analyze the results from trybots.
	TryBot Kind = "trybot"

	// Commit is a request to analyze a commit that's already landed.
	Commit Kind = "commit"
)

type Loader

type Loader interface {
	// Load the TryBot results for the given TryBotRequest.
	Load(context.Context, TryBotRequest, progress.Progress) (TryBotResponse, error)
}

Loader returns the data for the given TryBotRequest.

type TryBotRequest

type TryBotRequest struct {
	Kind Kind `json:"kind"`

	// CL is the ID of the changelist to analyze. Only use if Kind is TryBot.
	CL types.CL `json:"cl"`

	// PatchNumber is the index of the patch.
	PatchNumber int `json:"patch_number"`

	// CommitNumber is the commit to analyze. Only use if Kind is Commit.
	CommitNumber types.CommitNumber `json:"commit_number"`

	// Query is a query to select the set of traces to analys. Only used if Kind is Commit.
	Query string `json:"query"`
}

TryBotRequest is the request the UI sends to retrieve data to analyze.

type TryBotResponse

type TryBotResponse struct {
	Header   []*dataframe.ColumnHeader   `json:"header"`
	Results  []TryBotResult              `json:"results"`
	ParamSet paramtools.ReadOnlyParamSet `json:"paramset"`
}

TryBotResponse is the response sent to a TryBotRequest.

type TryBotResult

type TryBotResult struct {
	// Params is the parsed trace id in params format.
	Params paramtools.Params `json:"params"`

	// See vec32.StdDevRatio for the definitions of Median, Lower, Upper and StdDevRation.
	Median      float32 `json:"median"`
	Lower       float32 `json:"lower"`
	Upper       float32 `json:"upper"`
	StdDevRatio float32 `json:"stddevRatio"`

	// The values for the trace at the last N commits, and either the value at
	// commit N+1, or a trybot result, depending on the RequestKind sent in
	// TryBotRequest.
	Values []float32 `json:"values"`
}

TryBotResult of the analysis for a single trace id.

Directories

Path Synopsis
Package dfloader implements results.Loader using a DataFrameBuilder.
Package dfloader implements results.Loader using a DataFrameBuilder.

Jump to

Keyboard shortcuts

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