d516aab8fa
Also enhance RigidBody docs as per https://github.com/godotengine/godot-docs/pull/1018 and fix the version tag in all files (not really stable yet, but it makes no sense to hardcode rc3 at this stage).
113 lines
5.0 KiB
XML
113 lines
5.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="Performance" inherits="Object" category="Core" version="3.0-stable">
|
|
<brief_description>
|
|
Exposes performance related data.
|
|
</brief_description>
|
|
<description>
|
|
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.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<demos>
|
|
</demos>
|
|
<methods>
|
|
<method name="get_monitor" qualifiers="const">
|
|
<return type="float">
|
|
</return>
|
|
<argument index="0" name="monitor" type="int" enum="Performance.Monitor">
|
|
</argument>
|
|
<description>
|
|
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]
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<constants>
|
|
<constant name="TIME_FPS" value="0" enum="Monitor">
|
|
Frames per second.
|
|
</constant>
|
|
<constant name="TIME_PROCESS" value="1" enum="Monitor">
|
|
Time it took to complete one frame.
|
|
</constant>
|
|
<constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor">
|
|
Time it took to complete one physics frame.
|
|
</constant>
|
|
<constant name="MEMORY_STATIC" value="3" enum="Monitor">
|
|
Static memory currently used, in bytes. Not available in release builds.
|
|
</constant>
|
|
<constant name="MEMORY_DYNAMIC" value="4" enum="Monitor">
|
|
Dynamic memory currently used, in bytes. Not available in release builds.
|
|
</constant>
|
|
<constant name="MEMORY_STATIC_MAX" value="5" enum="Monitor">
|
|
Available static memory. Not available in release builds.
|
|
</constant>
|
|
<constant name="MEMORY_DYNAMIC_MAX" value="6" enum="Monitor">
|
|
Available dynamic memory. Not available in release builds.
|
|
</constant>
|
|
<constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7" enum="Monitor">
|
|
Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications.
|
|
</constant>
|
|
<constant name="OBJECT_COUNT" value="8" enum="Monitor">
|
|
Number of objects currently instanced (including nodes).
|
|
</constant>
|
|
<constant name="OBJECT_RESOURCE_COUNT" value="9" enum="Monitor">
|
|
Number of resources currently used.
|
|
</constant>
|
|
<constant name="OBJECT_NODE_COUNT" value="10" enum="Monitor">
|
|
Number of nodes currently instanced. This also includes the root node, as well as any nodes not in the scene tree.
|
|
</constant>
|
|
<constant name="RENDER_OBJECTS_IN_FRAME" value="11" enum="Monitor">
|
|
3D objects drawn per frame.
|
|
</constant>
|
|
<constant name="RENDER_VERTICES_IN_FRAME" value="12" enum="Monitor">
|
|
Vertices drawn per frame. 3D only.
|
|
</constant>
|
|
<constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="13" enum="Monitor">
|
|
Material changes per frame. 3D only
|
|
</constant>
|
|
<constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="14" enum="Monitor">
|
|
Shader changes per frame. 3D only.
|
|
</constant>
|
|
<constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="15" enum="Monitor">
|
|
Render surface changes per frame. 3D only.
|
|
</constant>
|
|
<constant name="RENDER_DRAW_CALLS_IN_FRAME" value="16" enum="Monitor">
|
|
Draw calls per frame. 3D only.
|
|
</constant>
|
|
<constant name="RENDER_VIDEO_MEM_USED" value="17" enum="Monitor">
|
|
Video memory used. Includes both texture and vertex memory.
|
|
</constant>
|
|
<constant name="RENDER_TEXTURE_MEM_USED" value="18" enum="Monitor">
|
|
Texture memory used.
|
|
</constant>
|
|
<constant name="RENDER_VERTEX_MEM_USED" value="19" enum="Monitor">
|
|
Vertex memory used.
|
|
</constant>
|
|
<constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20" enum="Monitor">
|
|
</constant>
|
|
<constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21" enum="Monitor">
|
|
Number of active [RigidBody2D] nodes in the game.
|
|
</constant>
|
|
<constant name="PHYSICS_2D_COLLISION_PAIRS" value="22" enum="Monitor">
|
|
Number of collision pairs in the 2D physics engine.
|
|
</constant>
|
|
<constant name="PHYSICS_2D_ISLAND_COUNT" value="23" enum="Monitor">
|
|
Number of islands in the 2D physics engine.
|
|
</constant>
|
|
<constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="24" enum="Monitor">
|
|
Number of active [RigidBody] and [VehicleBody] nodes in the game.
|
|
</constant>
|
|
<constant name="PHYSICS_3D_COLLISION_PAIRS" value="25" enum="Monitor">
|
|
Number of collision pairs in the 3D physics engine.
|
|
</constant>
|
|
<constant name="PHYSICS_3D_ISLAND_COUNT" value="26" enum="Monitor">
|
|
Number of islands in the 3D physics engine.
|
|
</constant>
|
|
<constant name="MONITOR_MAX" value="27" enum="Monitor">
|
|
</constant>
|
|
</constants>
|
|
</class>
|