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

Method Add

pkg/usagestats/stats.go:396–400  ·  view source on GitHub ↗
(word string)

Source from the content-addressed store, hash-verified

394}
395
396func (w *WordCounter) Add(word string) {
397 if _, loaded := w.words.LoadOrStore(xxhash.Sum64String(word), struct{}{}); !loaded {
398 w.count.Add(1)
399 }
400}
401
402func (w *WordCounter) String() string {
403 b, _ := json.Marshal(w.Value())

Callers 3

Test_BuildReportFunction · 0.95
Test_BuildStatsFunction · 0.95
TestWordCounterFunction · 0.95

Calls 1

AddMethod · 0.65

Tested by 3

Test_BuildReportFunction · 0.76
Test_BuildStatsFunction · 0.76
TestWordCounterFunction · 0.76