func (b *MemoryBackend) DecayScore() {
	b.mu.Lock()
	for sig := range b.scores {
		if b.scores[sig] > b.decayFactor*minSignatureScoreOffset {
			b.scores[sig] /= b.decayFactor
		} else {
			// When the score is too small, we can optimize by simply dropping the entry.
			delete(b.scores, sig)
		}
	}
	b.totalScore /= b.decayFactor
	b.sampledScore /= b.decayFactor
	b.mu.Unlock()
}
// DecayScore applies the decay to the rolling counters.
DecayScore applies the decay to the rolling counters.
// DecayScore applies the decay to the rolling counters .
func (b *MemoryBackend) DecayScore() {
	b.mu.Lock()
	for sig := range b.scores {
		if b.scores[sig] > b.decayFactor*minSignatureScoreOffset {
			b.scores[sig] /= b.decayFactor
		} else {
			delete(b.scores, sig)
		}
	}
	b.totalScore /= b.decayFactor
	b.sampledScore /= b.decayFactor
	b.mu.Unlock()
}
func ( b * MemoryBackend ) DecayScore ( ) { b . mu . Lock ( ) for sig := range b . scores { if b . scores [ sig ] > b . decayFactor * minSignatureScoreOffset { b . scores [ sig ] /= b . decayFactor } else { delete ( b . scores , sig ) } } b . totalScore /= b . decayFactor b . sampledScore /= b . decayFactor b . mu . Unlock ( ) }
DecayScore applies the decay to the rolling counters.
DecayScore applies the decay to the rolling counters .
// When the score is too small, we can optimize by simply dropping the entry.