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

Function estimateAttrSize

tempodb/encoding/vparquet5/create.go:317–329  ·  view source on GitHub ↗
(attrs []Attribute)

Source from the content-addressed store, hash-verified

315}
316
317func estimateAttrSize(attrs []Attribute) (size int) {
318 size += len(attrs) * 7 // 7 attribute lvl fields
319
320 // 1 byte for every entry in arrays after the first one.
321 for _, a := range attrs {
322 size += max(0, len(a.Value)-1)
323 size += max(0, len(a.ValueInt)-1)
324 size += max(0, len(a.ValueDouble)-1)
325 size += max(0, len(a.ValueBool)-1)
326 }
327
328 return
329}
330
331func estimateEventsSize(events []Event) (size int) {
332 for _, e := range events {

Callers 3

estimateEventsSizeFunction · 0.70
estimateLinksSizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected