Documentation ¶
Overview ¶
digest_counter returns counts of digests for various views on a Tile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter implements DigestCounter
func (*Counter) ByQuery ¶
func (t *Counter) ByQuery(tile *tiling.Tile, query paramtools.ParamSet) DigestCount
ByQuery returns a DigestCount of all the digests that match the given query in the provided tile.
func (*Counter) ByTest ¶
func (t *Counter) ByTest() map[types.TestName]DigestCount
ByTest implements the DigestCounter interface.
type DigestCount ¶
DigestCount maps a digest to a count. These counts are the number of times a digest was seen in a given scenario.
type DigestCounter ¶
type DigestCounter interface { // ByTest returns a map of test_name -> DigestCount ByTest() map[types.TestName]DigestCount // ByTrace returns a map of trace_id -> DigestCount ByTrace() map[tiling.TraceID]DigestCount // MaxDigestsByTest returns a map of all tests seen // in the tile mapped to the digest that showed up // the most in that test. MaxDigestsByTest() map[types.TestName]types.DigestSet // ByQuery returns a DigestCount of all the digests that match the given query in // the provided tile. Note that this will recompute the digests across the entire tile. ByQuery(tile *tiling.Tile, query paramtools.ParamSet) DigestCount }
DigestCounter allows querying for digest counts for a digest in different ways. For example, how many times did this tile see a given digest in a given test or a given trace? The results can be further filtered using ByQuery. It should be immutable once created and therefore thread-safe.