Calculate rolling averages in a LevelDB.