This greatly depends on many other variables to consider. Here are a few of them:
- What is my skill advantage versus my current opponents? If I perceive myself as the stronger poker player, then I should be less likely to go All-in because my chance of outplaying them later is higher. Playing a pro, or tough table, should incentivise All-In more often as the chance of me being exploited would increase as this game continues.
- How big is my advantage with this All-in? A premium holding like pocket aces (AA) are better worth getting all of my chips in with than less than marginal holdings I should likely fold (like J4o).
- What are the payout implications? A winner-take-all format should be a different strategy than an MTT with a money bubble...
- What is the effective stack? Shoving All-in with your last Big Blind in chips makes a lot of sense; All-in preflop might be suicidal at a much deeper stack, unless you have a super strong holding like AA or KK. If we have 100 Big Blind effective stack, then even a hand like JJ could be crushed...despite this being an "easy All-in" shallower stacked (maybe 10-20 bbs deep JJ is all right, but not a lot deeper)
- Table image of yourself and everyone else around you. Your All-in isn't going to get much credit if you've been splashing chips all game, but a rock NIT playstyle might be able to shove a different range of
hands profitably.
* There are many more possible things to consider too: Tournament ICM (if a tournament), mindset/tilt of you and others, game format cash game vs MTT matters a lot and many more things.
No one said poker was simple (or that all of these considerations are thought in every shove), but the more information you have, then ideally the better informed decisions you can make
Hope my long post and examples are helpful