persist stat calls to db