Quality of a square wave?
A Square Wave can be defined by amplitude , rise time, fall time, propagation delay, skew, overshoot, asymmetry, and droop if AC coupled.

When examining asymmetry very accurately at high frequency, it is often difficult to measure due to sensitivity with voltage threshold with slow rise times. But can be done with accurate Time Interval counter or DSO.

Anecdotal Experience

BEfore the time of DSO's, when I faced this problem, I determined the exact correlation between 2nd harmonic and %asymmetry by lab tests at low frequency, then used a spectrum analyzer to measure the 2nd harmonic content at very high frequencies and got very precise results.  A perfect Square and Triangle Waves are void of even harmonics and if the 2nd harmonic is down 20dB, it might look pretty good on a scope but in fact has poor symmetry which is critical for some applications.

I forget if -23dB was 1% error or more, but something like this. (forgive me it was 30yrs ago)  I used it to measure clock and data symmetry errors, sources of error in magnetic recording, and other applications due to DC offset or bias errors or unequal transition times.

Can you see the asymmetry error?  It's about 35dB down on 2nd harmonic.