How to calculate Oculus Rift DK2 latency in UE4

I heard that Oculus Rift DK2 have built in latency tester but the documentation on how to use in in UE4 is quite scarce. The only information that I found is some random Youtube video showing the demo for latency tester, not the actual code itself.

Can someone point it to me how to set it up in our own project?