indexer

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package indexer continously creates an index of the test results as the tiles, expectations and ignores change.

Index

Constants

View Source
const (
	// Event emitted when the indexer updates the search index.
	// Callback argument: *SearchIndex
	EV_INDEX_UPDATED = "indexer:index-updated"

	// Metric to track the number of digests that do not have be uploaded by bots.
	METRIC_KNOWN_HASHES = "known-digests"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	// contains filtered or unexported fields
}

Indexer is the type that drive continously indexing as the underlying data change. It uses a DAG that encodes the dependencies of the different components of an index and creates a processing pipeline on top of it.

func New

func New(storages *storage.Storage, interval time.Duration) (*Indexer, error)

New returns a new Indexer instance. It synchronously indexes the initiallly available tile. If the indexing fails an error is returned. The provided interval defines how often the index should be refreshed.

func (*Indexer) GetIndex

func (ixr *Indexer) GetIndex() *SearchIndex

GetIndex returns the current index, which is updated continously in the background. The returned instances of SearchIndex can be considered immutable and is not going to change. It should be used to handle an entire request to provide consistent information.

type SearchIndex

type SearchIndex struct {
	// contains filtered or unexported fields
}

SearchIndex contains everything that is necessary to search our current knowledge about test results. It should be considered as immutable. Whenever the underlying data change a new index is calculated via a pdag.

func (*SearchIndex) CalcSummaries

func (idx *SearchIndex) CalcSummaries(testNames []string, query url.Values, includeIgnores, head bool) (map[string]*summary.Summary, error)

Proxy to summary.CalcSummaries.

func (*SearchIndex) GetBlame

func (idx *SearchIndex) GetBlame(test, digest string, commits []*tiling.Commit) *blame.BlameDistribution

Proxy to blame.Blamer.GetBlame.

func (*SearchIndex) GetIgnoreMatcher

func (idx *SearchIndex) GetIgnoreMatcher() paramtools.ParamMatcher

GetIgnoreMatcher returns a matcher for the ignore rules that were used to build the tile with ignores.

func (*SearchIndex) GetParamsetSummary

func (idx *SearchIndex) GetParamsetSummary(test, digest string, includeIgnores bool) paramtools.ParamSet

Proxy to paramsets.Get

func (*SearchIndex) GetParamsetSummaryByTest

func (idx *SearchIndex) GetParamsetSummaryByTest(includeIgnores bool) map[string]map[string]paramtools.ParamSet

Proxy to paramsets.GetByTest

func (*SearchIndex) GetSummaries

func (idx *SearchIndex) GetSummaries(includeIgnores bool) map[string]*summary.Summary

Proxy to summary.Summary.Get.

func (*SearchIndex) GetTile

func (idx *SearchIndex) GetTile(includeIgnores bool) *tiling.Tile

GetTile returns the current tile either with or without the ignored traces.

func (*SearchIndex) MaxDigestsByTest

func (idx *SearchIndex) MaxDigestsByTest(includeIgnores bool) map[string]util.StringSet

Proxy to tally.Tallies.MaxDigestsByTest

func (*SearchIndex) TalliesByQuery

func (idx *SearchIndex) TalliesByQuery(query url.Values, includeIgnores bool) tally.Tally

ByQuery returns a Tally of all the digests that match the given query.

func (*SearchIndex) TalliesByTest

func (idx *SearchIndex) TalliesByTest(includeIgnores bool) map[string]tally.Tally

Proxy to tally.Tallies.ByTest

func (*SearchIndex) TalliesByTrace

func (idx *SearchIndex) TalliesByTrace(includeIgnores bool) map[string]tally.Tally

Proxy to tally.Tallies.ByTrace

Jump to

Keyboard shortcuts

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