Not easy. You can measure with your phone camera for visual delay but it's still suspect.
I measured my delay using a USB keyboard which are generally assumed to have zero delay but that's not great.
I base most of my delay numbers off of reviewers that have special hardware