Restructure stats into delta, mask, and aggregate layers

This commit is contained in:
flamingcow
2026-08-31 09:35:32 -07:00
parent ea272e489c
commit 06fa759b1a
11 changed files with 316 additions and 364 deletions
+7 -9
View File
@@ -17,13 +17,12 @@ type txStats struct {
}
type txWorker struct {
fd int
stream uint16
spec *frameSpec
batch int
stats *txStats
measuring *atomic.Bool
startTx <-chan struct{}
fd int
stream uint16
spec *frameSpec
batch int
stats *txStats
startTx <-chan struct{}
}
func (w *txWorker) run(done *atomic.Bool) {
@@ -64,8 +63,7 @@ func (w *txWorker) run(done *atomic.Bool) {
}
// Taking fewer of the vector than offered is the ring's room, not a frame
// lost: the rest go on the next pass.
if n < 0 && err != unix.EINTR && err != unix.EAGAIN && err != unix.ENOBUFS &&
!w.measuring.Load() {
if n < 0 && err != unix.EINTR && err != unix.EAGAIN && err != unix.ENOBUFS {
w.stats.errs.Add(1)
}
}