summary

package
v0.0.0-...-33de393 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package summary summarizes the current state of triaging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Traces       []*tiling.TracePair
	Expectations expectations.ReadOnly
	// ByTrace maps all traces in Trace to the counts of digests that appeared
	// in those traces.
	ByTrace map[tiling.TraceID]digest_counter.DigestCount
	Blamer  blame.Blamer
}

Data is a helper struct containing the data that goes into computing a summary.

func (*Data) Calculate

func (s *Data) Calculate(testNames types.TestNameSet, query paramtools.ParamSet, head bool) []*TriageStatus

Calculate calculates a slice of TriageStatus for the given data and query options. It will summarize only those traces that match the given testNames (if any), the query (if any), and optionally be only for those digests at head. At head means just the non-empty digests that appear in the most recent commit. The return value will have its entries sorted by TestName first, then sorted by Corpus in the event of a tie.

type TriageStatus

type TriageStatus struct {
	// TODO(kjlubick) Change Name/Corpus to be a more generic "Grouping"
	Name      types.TestName        `json:"name"`
	Corpus    string                `json:"corpus"`
	Pos       int                   `json:"pos"`
	Neg       int                   `json:"neg"`
	Untriaged int                   `json:"untriaged"`
	Num       int                   `json:"num"`
	UntHashes types.DigestSlice     `json:"untHashes"`
	Blame     []blame.WeightedBlame `json:"blame"`
	// currently unused
	Diameter int `json:"diameter"`
}

TriageStatus contains rolled up digest counts/blames for one test in one corpus. It is immutable and should be thread safe.

func MergeSorted

func MergeSorted(existing, newOnes []*TriageStatus) []*TriageStatus

MergeSorted creates a new []*TriageStatus from this and the passed in slices. The passed in data will "win" in the event there are tests in both. We assume that the two passed in slices are sorted by TestName,Corpus already.

Jump to

Keyboard shortcuts

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