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

Method ReadAt

tempodb/encoding/vparquet4/readers.go:141–156  ·  view source on GitHub ↗
(p []byte, off int64)

Source from the content-addressed store, hash-verified

139}
140
141func (wr *walReaderAt) ReadAt(p []byte, off int64) (int, error) {
142 if err := wr.ctx.Err(); err != nil {
143 return 0, err
144 }
145
146 // parquet-go will call ReadAt when reading data from a parquet file.
147 n, err := wr.r.ReadAt(p, off)
148 // ReadAt can read less than len(p) bytes in some cases
149 wr.bytesRead.Add(uint64(n))
150
151 if isFatalError(err) {
152 return 0, err
153 }
154
155 return n, err
156}
157
158func (wr *walReaderAt) BytesRead() uint64 {
159 return wr.bytesRead.Load()

Callers

nothing calls this directly

Calls 3

isFatalErrorFunction · 0.70
ReadAtMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected