Performance Class |
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 Monitor tab in the editor's Debugger panel. By using the GetMonitor(PerformanceMonitor) method of this class, you can access this data from your code.
Note: A few of these monitors are only available in debug mode and will always return 0 when used in a release build.
Note: Many of these monitors are not updated in real-time, so there may be a short delay between changes.
Namespace: Godot
public static class Performance
The Performance type exposes the following members.
Name | Description | |
---|---|---|
GetMonitor | Returns the value of one of the available monitors. You should provide one of the PerformanceMonitor constants as the argument, like this: print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console |