Skip to content

Commit d9c588a

Browse files
committed
introducing a new method is DiskStatsReporter which returns the bytes
written at index time
1 parent cb771b1 commit d9c588a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

segment.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,14 @@ type PostingsIterator interface {
106106
var CollectIOStats bool
107107

108108
type DiskStatsReporter interface {
109+
// BytesRead returns the bytes read from the disk as
110+
// part of the current running query.
109111
BytesRead() uint64
110-
SetBytesRead(uint64)
112+
// ResetBytesRead is used by the parent layer
113+
// to reset the bytes read value to a consistent
114+
// value during operations such as merging of segments.
115+
ResetBytesRead(uint64)
116+
BytesWritten() uint64
111117
}
112118

113119
type OptimizablePostingsIterator interface {

0 commit comments

Comments
 (0)