How to measure toilet flush valve?
The image attached to this answer, shows what the flush valve is.



It typically includes the overflow tube, but more specifically it's the flapper (or a device that controls the flow of water into the bowl).

Measure the tank discharge (flush) tube (the hole the flush valve (flapper) covers), to determine the size flush valve you need. The hole might be slightly larger or smaller then 2", but close enough is close enough.