Click or drag to resize

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.

Inheritance Hierarchy
SystemObject
  GodotPerformance

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static class Performance

The Performance type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberSingleton
Top
Methods
  NameDescription
Public methodStatic memberGetMonitor

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

Top
See Also