Skip to content

Commit 8c98466

Browse files
committed
Mention 1.10.13 pstats features
1 parent 5e5a77d commit 8c98466

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

optimization/using-pstats.rst

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,26 @@ the profiling machine:
7373
7474
pstats-host profiling-machine-ip-or-hostname
7575
76-
If you are developing Python code, you may be interested in reporting the
77-
relative time spent within each Python task (by subdividing the total time spent
78-
in Python, as reported under "Show Code"). To do this, add the following lines
79-
to your Config.prc file before you start ShowBase:
76+
.. only:: python
8077

81-
.. code-block:: text
78+
If you are developing Python code, you may be interested in reporting the
79+
relative time spent within each Python task (by subdividing the total time
80+
spent in Python, as reported under "Show Code"). To do this, add the
81+
following line to your Config.prc file before you start ShowBase:
82+
83+
.. code-block:: text
84+
85+
pstats-tasks 1
86+
87+
As of Panda3D 1.10.13 and Python 3.6 or higher, it is also possible to get a
88+
more detailed view of which specific Python modules, classes and functions
89+
are taking up time in the application. Note that this may slow down your
90+
application somewhat due to the fact that information is collected each time
91+
a function is called. To enable this, add the following line:
92+
93+
.. code-block:: text
8294
83-
task-timer-verbose 1
84-
pstats-tasks 1
95+
pstats-python-profiler 1
8596
8697
Caveats
8798
~~~~~~~
@@ -167,7 +178,8 @@ above the upper right corner of the graph. The labels on the guide bars on the
167178
right are also shown in milliseconds; if you prefer to think about a target
168179
frame rate rather than an elapsed time in milliseconds, you may find it useful
169180
to select "Hz" from the Units pulldown menu, which changes the time units
170-
accordingly.
181+
accordingly. As of Panda3D 1.10.13, a counter may also be shown in the top-right
182+
corner keeping track of how many times during a frame the collector is started.
171183

172184
The running Panda client suggests its target frame rate, as well as the initial
173185
vertical scale of the graph (that is, the height of the colored bars). You can

0 commit comments

Comments
 (0)