Table Of Contents

Previous topic

21.24. The IndexBufferManager Object

Next topic

21.26. The Light Object

This Page

21.25. The JSProfiling Object

The JSProfiling object provides some utilities to help process the results of TurbulenzEngine.stopProfiling.

See Profiling JavaScript for an overview of profiling.

Required scripts

The JSProfiling object requires:

/*{{ javascript("jslib/utilities.js") }}*/

21.25.1. Methods

21.25.1.1. createArray

Summary

Creates a flat array of profile nodes by merging all the common function calls in the passed in profile node tree.

Syntax

var rootNode = TurbulenzEngine.stopProfiling();

if (rootNode)
{
    var array = JSProfiling.createArray(rootNode);
    JSProfiling.sort(array);
    // ...
}

21.25.1.2. sort

Summary

Sorts the passed in array.

Syntax

JSProfiling.sort(array, propertyName, descending);
array
See JSProfiling.createArray()
propertyName
Optional property to sort by. Defaults to ‘totalTime’.
descending
Optional boolean, defaults to true.