rulesalgorithm

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AlgorithmVersion = 3

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

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{}

func (*Algorithm) Cluster

func (a *Algorithm) Cluster(ruleset *cache.Ruleset, existingRulesVersion time.Time, ruleIDs map[string]struct{}, failure *clustering.Failure)

Cluster incrementally (re-)clusters the given test failure, updating the matched cluster IDs. The passed existingRulesVersion and ruleIDs should be the ruleset.RulesVersion and cluster IDs of the previous call to Cluster (if any) from which incremental clustering should occur.

If clustering has not been performed previously, and clustering is to be performed from scratch, existingRulesVersion should be rules.StartingEpoch and ruleIDs should be an empty list.

This method is on the performance-critical path for re-clustering.

To avoid unnecessary allocations, the method will modify the passed ruleIDs.

Jump to

Keyboard shortcuts

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