Both Data and clock need to be delayed up to 50% so the both data or clock can be controlled early and late to find the phase margin due to asymmetric delays, transition times and noise.
Back in my hardware days in the mid-80s window margin was measured with digital control in nanoseconds. There were several versions of digital phase margin analyzers which were very useful. One box could inject jitter on the data using a PRSG selected early, nominal and late into a system to check if the clock recovery had enough phase margin when the data also had bit shift in magnetic media.