MCPcopy
hub / github.com/grafana/tempo / Test

Method Test

tempodb/encoding/common/bloom.go:78–81  ·  view source on GitHub ↗

Test implements bloom.Test -> required only for testing

(traceID []byte)

Source from the content-addressed store, hash-verified

76
77// Test implements bloom.Test -> required only for testing
78func (b *ShardedBloomFilter) Test(traceID []byte) bool {
79 shardKey := ShardKeyForTraceID(traceID, len(b.blooms))
80 return b.blooms[shardKey].Test(traceID)
81}
82
83func ShardKeyForTraceID(traceID []byte, shardCount int) int {
84 return int(util.TokenForTraceID(traceID)) % ValidateShardCount(shardCount)

Calls 1

ShardKeyForTraceIDFunction · 0.85