I've replaced a master cylinder, without that measuring tool. When you take out the old MC, carefully compare the piston shaft with the new one. I lucked out... their lengths were exactly the same.
If they're not exactly the same, you have to adjust the push-rod at the brake pedal. Otherwise your brake booster isn't sitting in the right position. It could become an excessive vacuum leak, or it won't give enough boost, or something like that.