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

Method ReadAtWithCache

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

Source from the content-addressed store, hash-verified

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

Callers 1

ReadAtMethod · 0.95

Calls 2

ReadRangeMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected