diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 71987ace9e6..82ee3531f18 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -1,8 +1,11 @@ + Exposes performance related data. + This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [i]Monitor[/i] tab in the editor's [i]Debugger[/i] panel. By using the [method get_monitor] method of this class, you can access this data from your code. Note that a few of these monitors are only available in debug mode and will always return 0 when used in a release build. + Many of these monitors are not updated in real-time, so there may be a short delay between changes. @@ -15,63 +18,93 @@ + Returns the value of one of the available monitors. You should provide one of this class's constants as the argument, like this: + [codeblock] + print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console + [/codeblock] + Frames per second. + Time it took to complete one frame. - + + Time it took to complete one physics frame. + Static memory currently used, in bytes. Not available in release builds. + Dynamic memory currently used, in bytes. Not available in release builds. + Available static memory. Not available in release builds. + Available dynamic memory. Not available in release builds. + Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. + Number of objects currently instanced (including nodes). + Number of resources currently used. + Number of nodes currently instanced. This also includes the root node, as well as any nodes not in the scene tree. + 3D objects drawn per frame. + Vertices drawn per frame. 3D only. + Material changes per frame. 3D only + Shader changes per frame. 3D only. + Render surface changes per frame. 3D only. + Draw calls per frame. 3D only. + + + Video memory used. Includes both texture and vertex memory. + + + Texture memory used. + + + Vertex memory used. - - - - - - + Number of active [RigidBody2D] nodes in the game. + Number of collision pairs in the 2D physics engine. + Number of islands in the 2D physics engine. + Number of active [RigidBody] and [VehicleBody] nodes in the game. + Number of collision pairs in the 3D physics engine. + Number of islands in the 3D physics engine.