Profiler - stingray.Profiler namespace reference - Stingray Lua API Reference
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.
|
Records statistics data (a float or vector3) for the in-game graph drawer.
|
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. |
|
Get various rendering stats.
|
Parameters Returns table |
Table with all the rendering stats in it.
|
|
Starts a profiling scope with the specified name, which allows you to measure the performance of script functions or code blocks in the in-game profiler.
|
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. |