The reference datum line for measurement is 0.300" diameter (hence the headspace comparator often sold by Hornady and others). The measurement here is taken to have a readout from that reference line aka datum to the where the rim contacts the bolt face. This is for the .223, 5.56, .222, .221 other cartridge may require a different datum reference diameter.
With actual headspace gauges the same standard is used (0.300" datum reference diameter). Thus the gauges looks like a bullet less cartridge, they usually are offered (are used) in GO, NOGO, Field configuration.
National Match gauges are done in small increments, usually 0.001" or so manufacturer dependent or customer stated.
While it is best to have all three, actually only two are required as a have to have. GO and NOGO which may or may not be the common accepted practice as certain organizations have certain requirement, but for home usage should be fine.
Field is the longest safe length. The primary function is used with bolt barrel combinations, for serviceability quick checks usually assembled although not always.
NOGO is beyond the maximum. If the bolt closes on this gauge it is rejected. Choices are use a different bolt. barrel, or reset the barrel extension.
GO is set at minimum (shortest length).
Note: The ejector, spring. and it's retaining pin should be removed from the bolt to prevent a false reading. Performing this check either with barrel mounted / attached inside upper receiver is acceptable. If the barrel is attached to the upper the gas tube should be removed or not installed yet prevent interface with a fully assembled bolt carrier group. Personal preference is to perform the check prior to assembly using barrel with extension and just the bolt. As a greater sensitivity of feel / control can be observed. Either method is acceptable.
But if checking an already assembled rifle barrel removal is not required. Some gauges do have relief areas cut out /milled allowing ejectors to remain in place
The goal is that the locking lugs fully lock and engage within the barrel extension on the GO gauge. FIELD preference is it barely locks, then lock with slight pressure assistance (although is acceptable if it does freely lock as long as the NOGO doesn't lock). The NOGO should not fully lock even with applying extra pressure by hand. If the NOGO locks that barrel bolt combination is rejected.