Pass a single image and find its inference time

Deepstream docker version - 6.1.1
I want to pass a single image to the pgie and find out how long it takes to infer.
I replaced h264parser with jpegparser in deepstream-test-1 python.
But how do I get the time it took to infer that one image?

You can refer to the Enable Latency measurement for deepstream sample apps to get the latency of the nvinfer plugin.

The code is in c++. Can i get the python code anywhere

There are 3 scenarios for this topic. Please refer to the 3rd scenario.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks