moving average over the socket lag and more compact logging