H.265 encoder delay on Jetson TX2

Hi everyone,
I want to calculate the H.265 encode delay on Jetson TX2. How can I do that?
Any suggestion is appreciated.
P.S. I am using gstreamer to get HDMI video input
Thank in advance.
Best regards.

https://devtalk.nvidia.com/default/topic/1032771/jetson-tx2/no-encoder-perfomance-improvement-before-after-jetson_clocks-sh/post/5254337/#5254337

PLease try to configure MeasureEncoderLatency

Thank DaneLLL, I will check your solution.
Best regards