Generate stats on the backend.