Profiler - stingray.Profiler namespace reference - Stingray Lua API Reference

stingray.Profiler namespace reference

Description

The interface to the built-in profiling system.

You start a new profiling scope by calling start(), and passing a string identifier that you can use to recognize the code block being measured when you look at the in-game profiler.

While a scope is open, you can start a new nested profiling scope by calling start() again.

Always close each scope by calling stop(). Calls to start() and stop() must be balanced: each block that you start must be closed by a call to stop(). Otherwise, your nesting may not turn out the way you expect.

Functions

Parameters

name :

string

Specifies the name.

value :

any(number, stingray.Vector3)

Specifies the value.

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns
This function does not return any values.
Parameters

window :

stingray.Window

Name for which we extract rendering statistics.

Returns

table

Table with all the rendering stats in it.

Parameters

name :

string

The name of the new profiling scope.

Returns
This function does not return any values.

Note: The profiling system uses string pointers rather than string values. To get accurate results, you must make sure that the strings you pass to this function do not get garbage collected before you stop profiling. If you pass dynamic strings, you must save them in a table somewhere.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.