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

Method ReadAtWithCache

tempodb/encoding/vparquet5/readers.go:41–51  ·  view source on GitHub ↗
(p []byte, off int64, role cache.Role)

Source from the content-addressed store, hash-verified

39}
40
41func (b *BackendReaderAt) ReadAtWithCache(p []byte, off int64, role cache.Role) (int, error) {
42 err := b.r.ReadRange(b.ctx, b.name, (uuid.UUID)(b.meta.BlockID), b.meta.TenantID, uint64(off), p, &backend.CacheInfo{
43 Role: role,
44 Meta: b.meta,
45 })
46 if isFatalError(err) {
47 return 0, err
48 }
49 b.bytesRead.Add(uint64(len(p)))
50 return len(p), err
51}
52
53func (b *BackendReaderAt) BytesRead() uint64 {
54 return b.bytesRead.Load()

Callers 1

ReadAtMethod · 0.95

Calls 3

isFatalErrorFunction · 0.70
ReadRangeMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected