diff --git a/main.go b/main.go index 55989ce..58f28aa 100644 --- a/main.go +++ b/main.go @@ -186,12 +186,12 @@ var intervalCols = []colSpec{ {title: "TX Gb/s", width: 7, right: true}, {title: "RX pps", width: 9, right: true}, {title: "RX Gb/s", width: 7, right: true}, - {title: "LOST", width: 8, right: true}, - {title: "LATE", width: 6, right: true}, - {title: "CRC", width: 5, right: true}, - {title: "BADMAG", width: 6, right: true}, - {title: "KDROP", width: 7, right: true}, - {title: "ERRORS", width: 10, right: true}, + {title: "LOST", width: 11, right: true}, + {title: "LATE", width: 9, right: true}, + {title: "CRC", width: 7, right: true}, + {title: "BADMAG", width: 7, right: true}, + {title: "KDROP", width: 11, right: true}, + {title: "ERRORS", width: 11, right: true}, } func (d *direction) intervalRow(elapsed time.Duration, secs, target float64) []string { @@ -204,7 +204,6 @@ func (d *direction) intervalRow(elapsed time.Duration, secs, target float64) []s rxF := now.rxFrames - p.rxFrames rxB := now.rxBytes - p.rxBytes - before := d.drops d.sampleDrops() total := now.lost + now.crcErr + now.badMagic + now.badLen + d.drops @@ -215,11 +214,11 @@ func (d *direction) intervalRow(elapsed time.Duration, secs, target float64) []s rateCell(gbps(txB, txF, secs), target), commas(uint64(float64(rxF) / secs)), rateCell(gbps(rxB, rxF, secs), target), - statusCell(now.lost - p.lost), - statusCell(now.late - p.late), - statusCell(now.crcErr - p.crcErr), - statusCell(now.badMagic - p.badMagic), - statusCell(d.drops - before), + statusCell(now.lost), + statusCell(now.late), + statusCell(now.crcErr), + statusCell(now.badMagic), + statusCell(d.drops), statusCell(total), } } @@ -478,6 +477,7 @@ func run(aName, bName, sizesArg, patArg, fanout, txCPUsArg, rxCPUsArg string, humanBytes(uint64(sockBufSize(dirs[0].txFDs[0], unix.SO_SNDBUF))), humanBytes(uint64(sockBufSize(dirs[0].rxFDs[0], unix.SO_RCVBUF))))}, })) + fmt.Println(paint("rates are per interval; error counts are cumulative since start", cDim)) fmt.Println() var doneTx, doneRx atomic.Bool