summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-09 21:57:32 +0100
committerGitHub <noreply@github.com>2022-02-09 21:57:32 +0100
commitd22ac13bc2f29cb9e490f5a7838fcd52805682cf (patch)
treece08c3682a09adf8cf4cdde689535cc3f7bf3778 /doc
parent2c28729122c71e025f9491b3d9905752341530fe (diff)
parent65837973051e2aea43019fb5c20ec4a1debf0bcb (diff)
Merge pull request #57715 from Faless/debugger/4.x_core_includes_and_servers
[Debugger] Move most profilers to ServersDebugger, fix core includes.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/EngineDebugger.xml9
-rw-r--r--doc/classes/EngineProfiler.xml39
2 files changed, 41 insertions, 7 deletions
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index 861053b1c9..0e1bf99afc 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -65,14 +65,9 @@
<method name="register_profiler">
<return type="void" />
<argument index="0" name="name" type="StringName" />
- <argument index="1" name="toggle" type="Callable" />
- <argument index="2" name="add" type="Callable" />
- <argument index="3" name="tick" type="Callable" />
+ <argument index="1" name="profiler" type="EngineProfiler" />
<description>
- Registers a profiler with the given [code]name[/code].
- [code]toggle[/code] callable is called when the profiler is enabled/disabled. It must take an argument array as an argument.
- [code]add[/code] callable is called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. It must take a data array as argument.
- [code]tick[/code] callable is called at every active profiler iteration. It must take frame time, idle time, physics time, and physics idle time as arguments.
+ Registers a profiler with the given [code]name[/code]. See [EngineProfiler] for more informations.
</description>
</method>
<method name="send_message">
diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml
new file mode 100644
index 0000000000..88780b1a41
--- /dev/null
+++ b/doc/classes/EngineProfiler.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EngineProfiler" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Base class for creating custom profilers.
+ </brief_description>
+ <description>
+ This class can be used to implement custom profilers that are able to interact with the engine and editor debugger.
+ See [EngineDebugger] and [EditorDebuggerPlugin] for more informations.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_add_frame" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="data" type="Array" />
+ <description>
+ Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data].
+ </description>
+ </method>
+ <method name="_tick" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="frame_time" type="float" />
+ <argument index="1" name="idle_time" type="float" />
+ <argument index="2" name="physics_time" type="float" />
+ <argument index="3" name="physics_frame_time" type="float" />
+ <description>
+ Called once every engine iteration when the profiler is active with informations about the current frame.
+ </description>
+ </method>
+ <method name="_toggle" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="enable" type="bool" />
+ <argument index="1" name="options" type="Array" />
+ <description>
+ Called when the profiler is enabled/disabled, along with a set of [code]options[/code].
+ </description>
+ </method>
+ </methods>
+</class>