I've always used 2 tablespoons cane sugar per gallon, ignoring the yeast cake, with pretty dang consistently good results. If there's also a huge amount of hops like in an IPA, then I account for that. As for measuring it, you can mark your fermentation vessel in advance by pouring exact amounts in and marking it off, or if not see through you can "stick the tank" by making your marks on a dowel or other reference tool that you can sanitize and stick into the vessel at the end of fermentation to measure.