Commit bcf25f55 authored by Geoff Simmons's avatar Geoff Simmons

govarnishlog can print a r/w channel length high watermark.

parent 0bc3a52b
......@@ -67,6 +67,7 @@ var (
eol = uint64(0)
printTxFunc = printTxTerse
printRecFunc = printRecTerse
chanHi = 0
)
func newIdle(seen uint64, seenLast uint64, t time.Time,
......@@ -112,6 +113,10 @@ func txReader(q *log.Query, txChan chan []log.Tx, statusChan chan log.Status,
return
}
txChan <- txGrp
chanLen := len(txChan)
if chanLen > chanHi {
chanHi = chanLen
}
seen++
}
}
......@@ -252,6 +257,8 @@ LOOP:
stop.Sub(start))
fmt.Fprintf(os.Stderr, "%d tx grps read\n", seen)
fmt.Fprintf(os.Stderr, "%d tx grps written\n", n)
fmt.Fprintf(os.Stderr, "%d r/w channel high watermark\n",
chanHi)
fmt.Fprintf(os.Stderr, "%d times reader at eol\n", eol)
fmt.Fprintf(os.Stderr, "%v reader total idle time\n", totIdle)
fmt.Fprintf(os.Stderr, "%v mean idle time\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment