Technically it varies.
For rifles & pistols, not revolvers.
IF the brake is "permanently attached" you measure for legal purposes from the closed bolt face to the front edge of the muzzle device.
IF it is "removable" (not "welded & pinned") then you measure from the closed bolt face to the end of the muzzle, ignoring the add on brake.