sys-block/
mbuffer

M(easuring)buffer is a replacement for buffer with additional functionality

https://www.maier-komor.de/mbuffer.html