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 [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel. By using the [method get_monitor] method of this class, you can access this data from your code. [b]Note:[/b] A few of these monitors are only available in debug mode and will always return 0 when used in a release build. [b]Note:[/b] Many of these monitors are not updated in real-time, so there may be a short delay between changes.
Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this: [codeblock] print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console [/codeblock]
Number of frames per second.
Time it took to complete one frame, in seconds.
Time it took to complete one physics frame, in seconds.
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 in the scene tree. This also includes the root node.
Number of orphan nodes, i.e. nodes which are not parented to a node of 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.
Items or joined items drawn per frame.
Draw calls per frame.
The amount of video memory used, i.e. texture and vertex memory combined.
The amount of texture memory used.
The amount of vertex memory used.
Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0.
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.
Output latency of the [AudioServer].
Represents the size of the [enum Monitor] enum.