HolyLib Wiki

vprof

vprof

This library adds a vprof(the engine performanc profiler) related functions.

Methods

boolean vprof.AtRoot( )
Returns true if is vprof scope currently is at it's root node.
Returns the budget group id by the given name.
vprof.EnterScope( string name, number detailLevel, string budgetGroup )
Enters a new scope. The scope name is permanently allocated and only freed when vprof.Term is called.
Use a consistent scope name if you don't want to have memory leaks.
vprof.ExitScope()
Leaves the current scope.
Returns or counter the given vprof counter.
If the vprof counter limit is hit, it will return a dummy vprof counter!
Returns the color of the given budget group.
Returns the name of the budget group by the given index.
Returns the name of the budget group by the given index.
Returns the vprof counter of the given index.
Returns the current node.
Returns the current detail level.
Returns the number of budget groups.
Returns the number of counters that exist.
Returns the peak time of the root node.
VProfNode vprof.GetRoot( )
Returns the root node.
Returns the time the last frame took.
Returns the total time of the root node.
vprof.HideBudgetGroup( string name, boolean hide = false )
Hides/Unhides the given budget group.
boolean vprof.IsEnabled( )
Returns true if vprof is enabled/running.
vprof.MarkFrame()
If vprof is enabled, it will call VProfNode:MarkFrame on the root node.
Returns the number of frames it sampled.
vprof.Pause()
Pauses vprof.
vprof.Reset()
Resets vprof.
Resets all vprof counters back to 0.
vprof.ResetPeaks()
Resets all peaks.
vprof.Resume()
Resumes vprof.
vprof.Start()
Starts vprof.
vprof.Stop()
Stops vprof.
vprof.Term()
Terminates vprof and frees the memory of everything.
This will invalidate all VProfCounter and VProfNode.
This means that if you try to use one that you stored in lua, it could crash! This should probably never be used.