Skip to content

ProfileValue

Narta Xaymar Dirks edited this page Nov 1, 2026 · 1 revision

ProfileValue

ProfileValue:Float32 key:String
Parameter Mode Type Default Description
key In String required The name of the item, such as frame or RenderWorld: draws.

Returns: The time in milliseconds, 0 for a key that does not exist.

Description

Reads one number of the last measured frame, in milliseconds, by its key. A frame is the time from one Flip to the next, and the numbers are updated by every Flip, so reading them right after a Flip gives the frame that just ended and nothing needs to be parsed. The key is the name of the item, in any case: frame (the time of the whole frame), the timers of the runtime (UpdateWorld, animation, RenderWorld, EntityInView, CopyRect, Flip, Delay, RenderWorld: lights+cameras, RenderWorld: collect, RenderWorld: draws, RenderWorld: sort+group, clusters for GPU culling, record commands), waiting for the GPU, the GPU passes (gpu scene, gpu 2d, gpu copy, gpu present, gpu frame) and vkQueueSubmit, followed by the keys of the program's own parts (ProfileBegin). ProfileItemName lists the keys. The GPU times come back a frame or two late, so they are what finished during that frame. Without --profile (or -d), or with the timers off (ProfileEnable), the numbers stay 0.

Differences

  • This is a BlitzLLVM extension: the original has no such command.

Examples

Graphics 64, 64, 0, 2
For i = 1 To 10
	Cls
	Flip
	Print "frame " + ProfileFlipCount() + ": " + ProfileValue("frame") + " ms, draws " + ProfileValue("RenderWorld: draws")
Next

Related Commands

ProfileBegin, ProfileEnable, ProfileEnd, ProfileFlipCount, ProfileFPS, ProfileItemCount, ProfileItemName, ProfileOutput

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally