Pstats and fps counter in Pview

Hello, I’m new to Panda3D and sorry if it sounds too kiddish :wink:

I was thinking if there was a way to view the current fps and pstats data while viewing a model or animation in Pview. Is it possible? If yes then how?

Welcome! I hope that you enjoy your time with the engine. :slight_smile:

Not at all. :slight_smile:

I don’t know of a way to hook PView into PStats, I’m afraid.

However, you can have PView report the current frame-rate: while PView is running, press “f”. This should result in the current frame-rate being printed out to the console/terminal.

(By the way, you can see a list of PView’s various controls by pressing “?” while PView is running.)

1 Like

The show-frame-rate-meter Config.prc setting affects pview, too.

Press shift+S to connect pview to pstats.

1 Like

Thanks, exactly like what I wanted.

I tried that but it shows some error like :

Connecting to stats host
:net(error): Unable to open TCP connection to server [::1]:5185
:pstats(error): Couldn't connect to PStatServer at localhost:5185

… and then PStats won’t open.

Did you have PStats running at the time? If so, do you perhaps have a firewall blocking that connection?

No, not at all. I even don’t know how to open Pstats( BTW, how do I open)

I don’t know

Ah, that would likely be the problem then!

Simply put, open a terminal/console and run the command “pstats”. You should see a little window pop up, indicating that the program is running.

Once it is running, applications should be able to connect to it automatically, I believe.

Oh really thanks, @Thaumaturge . It works fine now. Thanks again !

1 Like