Measure carefully...
From the bolt face to the muzzle, and subtract the length of the chamber. This is the effective length of your barrel. Measure from the bolt face to the end of the barrel (the end of the muzzle brake if it is permanently attached), this is the legal length of your barrel. Note that they may not be the same.
a nominal 22" barrel length includes the chamber, and usually excludes muzzle attachments like muzzle brakes or flash suppressors or flash hiders. Usually, but not always. It depends on who does the measuring.
One thing to consider, the gasses venting out of a muzzlebrake do not do so until after the bullet has passed the ports. Any velocity loss due to the size of the chamber of the muzzle brake is miniscule, and while it may be measurable (possibly) it is less than the variation in velocity between individual barrels, or even individual rounds. In other words, don't fret about it.
As mentioned, the brake was developed to lessen the recoil stresses on artillery and tank cannon. One additional benefit was discovered for tank guns, the fact that by venting some of the blast to the sides, it reduced the amount of dust (caused by firing) directly in front of the gun. Under some conditions this was a considerable benefit, allowing a faster recovery of sight picture for follow up shots. Under other conditions, not so much. The primary benefit of reduced recoil stress remained the most important factor, as it is for muzzle brakes on small arms.