Beast Master
7th level Exceptional Training
On any of your turns, you can command it to Dash, dodge, Disengage, or Help.
Additionally, on your turn, you can use a bonus action to set your companion loose in combat. You can initially use a bonus action to let it loose on one target, then let it continue attacking other creatures it selects on its own. Unless you use another bonus action to command it otherwise. It uses it's own initiative. Until the end of combat your companion will continue to attack any hostile creature without the need of your command. During this time, it will not use Dodge or Help. It may Dash on its own to reach a creature in combat or Disengage on its own if Critically injured. You can use an action to control your companion.
Let's toss out a scenario: Party level 9. The Ranger has 20 Dex (2 ASI to Dex), A +2 main weapon, and a +1 off-hand. Armor is pretty rare by the book so +1 Studded.
She has AC 18, attacks twice at +11 for 1d6+7, and twice at +10 for 1d6+6. A solid companion at 9th is a Dire Wolf. Drop the 6th level ASI into Strength.
Dire Wolf attacks once at +10 for 2d6+8 (with advantage if another character is there for Pack Tactics) Save DC 14 for prone.
Assume the Dire Wolf goes first so Sneak and possible prone can trigger. If so add +2d8 sneak and all 4 of your attacks are at Advantage.
Just looking at average damage if everything hits (which it should if everything is at advantage): Ranger: 49, Companion: 15, 64 with at wills. Add an extra 14 from Hunter's Mark on the second round. On following rounds 78 as long as you can maintain Concentration.
So what is the Fighter busting out at 9th? Stats into Strength and PAM. Full Plate or Splint +1 plus a Ring of Protection. +2 Halberd. AC 19. Normal 2 attacks at +11 for 1d10+7, butt +11 for 1d4+7. With a Surge 5 attacks once. Drop a Trip early to get Advantage on remaining attacks. Fighter (at-will) 34.5, +13.5 with 3 Superiority dice (limited), nova (all SD plus Surge) 59.5+22.5. So his once per short rest nova does 82. After that 34.5.
So let's switch it up for the less optimal bow plus better maintenance of Hunter's Mark. AC 18 with the +1 studded and +2 Longbow. +13 for 1d8+7. Swap the companion to Tiger for the Pounce (since you have less synergy with Pack Tactics).
Send in the Tiger for the Pounce +10 claw for 1d8+8, followed by the trip (DC 14) and another +10 bite for 1d10+8. Crap, just screwed our archery. Let's do Giant Eagle or Giant Hyena instead. Both have a single attack for +10 2d6+8. Eagle ASIs Dex, Hyena Strength. Hyena AC 16. Eagle AC 18. Eagle has the edge on AC, but Hyena gets a potential bonus attack on a drop. They slide around to the side to get out of your way.
2 bows shots plus a Companion attack. 2x11.5+15+9 sneak for 47 at will. +7 once Hunter's Mark kicks in. 54 a round.