The entire magazine or until theyre dead! They tried killing you for christs sake, they failed and get the exact thing in return... its called a deadly weapon for a reason, if needed and not used for its intended purpose, they may come back for round two in the future and succeed.
You shoot until the threat stops, not until it's dead. It is called a deadly weapon because its use can cause a death much easier than a less-lethal weapon. That does not mean that you use it until the threat is dead. You shoot until the threat stops, if they assailant dies as a result, then that is unfortunate; but it was not your intention to kill him (or her).
If you go into the grand jury after a shooting and say what you said in defense of your actions, you will have a much harder time proving that all of your actions were justified.