Decouple reporting & collecting stats, and improved final report.
Decouple reporting & collecting stats, and improved final report.

Use a timer with signals to report outside the main thread of moving
data & gathering stats. That allows using blocking reads, which is
nicer to the CPU, instead of constantly checking the buffer in a super
tight loop. Also is more consistent, probably, if signals can be handled
while data is being moved.

heewa/pipestats