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

Method Hash

tempodb/backend/block_meta.go:396–413  ·  view source on GitHub ↗

Hash hashes the given dedicated columns configuration

()

Source from the content-addressed store, hash-verified

394
395// Hash hashes the given dedicated columns configuration
396func (dcs DedicatedColumns) Hash() uint64 {
397 if len(dcs) == 0 {
398 return 0
399 }
400 h := xxhash.New()
401 for _, c := range dcs {
402 _, _ = h.WriteString(string(c.Scope))
403 _, _ = h.Write(separatorByte)
404 _, _ = h.WriteString(c.Name)
405 _, _ = h.Write(separatorByte)
406 _, _ = h.WriteString(string(c.Type))
407 for _, opt := range c.Options {
408 _, _ = h.Write(separatorByte)
409 _, _ = h.WriteString(string(opt))
410 }
411 }
412 return h.Sum64()
413}
414
415func (dcs DedicatedColumns) Size() int {
416 if len(dcs) == 0 {

Callers 15

DedicatedColumnsHashMethod · 0.80
SanitizeMethod · 0.80
Test_counter_cantAddFunction · 0.80
IncMethod · 0.80
ObserveWithExemplarMethod · 0.80
newSeriesMethod · 0.80
ObserveWithExemplarMethod · 0.80
newSeriesMethod · 0.80

Calls 1

WriteMethod · 0.65