store stats before metadata updates

Change-Id: I699658aa584ac9983b6c89af6892d73046d33235