How can i get the simulation statistics with python

When running the simulation of a scene in Isaacsim GUI, we can see the real-time FPS and GPU memory consumption of the scene. How can i get the real time FPS and memory consumption when i use omni isaac python pakage to load and play the usd scene? Is there any example code or documentations. i can refer to .

I found a script example to limit the FPS of the simulation, i will try to get fps base on that script