what percent of you stack has to be in the pot to be pot commited?
Percentage of your stack usually has little to do with it.
In a cash game you are committed if you feel that the
odds of winning the pot are better than the ratio of your remaining stack to what can be won. (IE, if it cost you $5 to call what will be a $25 pot, and you figure you will win 1/3 of the time, you happily call. But if you think you only win 1/8 times you fold)
In a tournament there are other factors such as the bubble to consider. For example you don't want to go out before the money and you don't want to take unnecessary risks if chips can be had in easier ways.
But otherwise, the same theory applies. If the amount of chips you have to put in gives you a good deal in relationship to your odds of winning, you put those chips in.
I guess both of those scenarios were about calling.
If you shove first, you get a bit of fold
equity which might make going all-in a little more profitable.