Calculate average as well as average rate.
Show moving averages correctly for queue lengths, and remove some nasty magic passing around null functions.