2024-01-18 22:35:17 +00:00
|
|
|
extends DebugLabel
|
|
|
|
|
|
|
|
@export var monitor: Performance.Monitor
|
2024-02-12 11:38:31 +00:00
|
|
|
@export var multiply := 1.0
|
|
|
|
@export var precision := 0.1
|
|
|
|
@export var suffix := ""
|
2024-01-18 22:35:17 +00:00
|
|
|
|
|
|
|
func _process(_delta):
|
2024-02-24 15:42:26 +00:00
|
|
|
match monitor:
|
|
|
|
Performance.Monitor.TIME_PROCESS, Performance.Monitor.TIME_PHYSICS_PROCESS:
|
|
|
|
text = str(snapped(Performance.get_monitor(monitor) * 1000, 0.1)) + " ms"
|
|
|
|
Performance.Monitor.RENDER_TOTAL_PRIMITIVES_IN_FRAME:
|
|
|
|
text = str(round(Performance.get_monitor(monitor) / 1000)) + "k"
|
|
|
|
Performance.Monitor.RENDER_VIDEO_MEM_USED:
|
|
|
|
text = str(round(Performance.get_monitor(monitor) / 1000000)) + " MB"
|
|
|
|
_:
|
|
|
|
text = str(Performance.get_monitor(monitor))
|