Mirror the panel in the console table as one summed row in two sections

This commit is contained in:
flamingcow
2026-08-04 14:02:53 -07:00
parent fbfcabda7e
commit 63196eb691
4 changed files with 76 additions and 98 deletions
+1 -11
View File
@@ -7,9 +7,7 @@ import (
)
type txStats struct {
frames atomic.Uint64
bytes atomic.Uint64
errs atomic.Uint64
errs atomic.Uint64
}
type txWorker struct {
@@ -32,7 +30,6 @@ func (w *txWorker) run(done *atomic.Bool) {
w.spec.prefill(bufs[i], pats[i])
}
hdrs, iovs := newMmsghdrs(bufs)
sizes := make([]int, w.batch)
<-w.startTx
@@ -45,19 +42,12 @@ func (w *txWorker) run(done *atomic.Bool) {
if si == len(w.spec.sizes) {
si = 0
}
sizes[i] = size
putHeader(bufs[i], pats[i], w.stream, seq+uint64(i), size-minFrame)
iovs[i].Len = uint64(size)
}
n, err := sendmmsg(w.fd, hdrs)
if n > 0 {
var b uint64
for i := 0; i < n; i++ {
b += uint64(sizes[i])
}
w.stats.frames.Add(uint64(n))
w.stats.bytes.Add(b)
seq += uint64(n)
}
// Taking fewer of the vector than offered is the ring's room, not a frame