in pq/reader.go [274:304]
func (r *Reader) adoptEventStats() {
if r.state.totEventBytes < 0 {
// no active event
return
}
// update stats:
skipping := r.state.eventBytes > 0
if skipping {
r.stats.Skipped++
r.stats.BytesSkipped += uint(r.state.eventBytes)
r.stats.BytesTotal += uint(r.state.totEventBytes - r.state.eventBytes)
} else {
bytes := uint(r.state.totEventBytes)
r.stats.BytesTotal += bytes
if r.stats.Read == 0 {
r.stats.BytesMin = bytes
r.stats.BytesMax = bytes
} else {
if r.stats.BytesMin > bytes {
r.stats.BytesMin = bytes
}
if r.stats.BytesMax < bytes {
r.stats.BytesMax = bytes
}
}
r.stats.Read++
}
}