Documentation ¶
Overview ¶
Package testname contains the test name-based clustering algorithm for LUCI Analysis.
Index ¶
- Constants
- Variables
- type Algorithm
- func (a *Algorithm) Cluster(config *compiledcfg.ProjectConfig, failure *clustering.Failure) []byte
- func (a *Algorithm) ClusterDescription(config *compiledcfg.ProjectConfig, summary *clustering.ClusterSummary) (*clustering.ClusterDescription, error)
- func (a *Algorithm) ClusterTitle(config *compiledcfg.ProjectConfig, example *clustering.Failure) string
- func (a *Algorithm) FailureAssociationRule(config *compiledcfg.ProjectConfig, example *clustering.Failure) string
- func (a *Algorithm) Name() string
Constants ¶
const AlgorithmVersion = 4
AlgorithmVersion is the version of the clustering algorithm. The algorithm version should be incremented whenever existing test results may be clustered differently (i.e. Cluster(f) returns a different value for some f that may have been already ingested).
Variables ¶
var AlgorithmName = fmt.Sprintf("%sv%v", clustering.TestNameAlgorithmPrefix, AlgorithmVersion)
AlgorithmName is the identifier for the clustering algorithm. LUCI Analysis requires all clustering algorithms to have a unique identifier. Must match the pattern ^[a-z0-9-.]{1,32}$.
The AlgorithmName must encode the algorithm version, so that each version of an algorithm has a different name.
Functions ¶
This section is empty.
Types ¶
type Algorithm ¶
type Algorithm struct{}
Algorithm represents an instance of the test name-based clustering algorithm.
func (*Algorithm) Cluster ¶
func (a *Algorithm) Cluster(config *compiledcfg.ProjectConfig, failure *clustering.Failure) []byte
Cluster clusters the given test failure and returns its cluster ID (if it can be clustered) or nil otherwise.
func (*Algorithm) ClusterDescription ¶
func (a *Algorithm) ClusterDescription(config *compiledcfg.ProjectConfig, summary *clustering.ClusterSummary) (*clustering.ClusterDescription, error)
ClusterDescription returns a description of the cluster, for use when filing bugs, with the help of the given example failure.
func (*Algorithm) ClusterTitle ¶
func (a *Algorithm) ClusterTitle(config *compiledcfg.ProjectConfig, example *clustering.Failure) string
ClusterTitle returns a definition of the cluster, typically in the form of an unhashed clustering key which is common across all test results in a cluster. For display on the cluster page or cluster listing.
func (*Algorithm) FailureAssociationRule ¶
func (a *Algorithm) FailureAssociationRule(config *compiledcfg.ProjectConfig, example *clustering.Failure) string
FailureAssociationRule returns a failure association rule that captures the definition of cluster containing the given example.