FabricStatistics Extension’s Free Functions

AddStatisticsChild ( in Ref<StatisticSource> parent, in Ref<StatisticSource> child )

Declares a parent-child relationship between two statistic sources (hierarchy) See 統計(Statistics) for an example of usage.


Size BeginProfilingEvent ( in String label )

Records that a profiling event. The function returns a key that is needed for calling the associated EndProfilingEvent. It is recommended to use the AutoProfilingEvent helper, for simplicity and to minimize error risks. See プロファイリング for an example of usage.

label Identifies the profiling event. The FUNC built-in KL constant can be used to identify current function.


Size BeginProfilingEvent ( in String label, in Ref<StatisticSource> source )

Records a profiling event. The function returns a key that is needed for calling the associated EndProfilingEvent. It is recommended to use the AutoProfilingEvent helper, for simplicity and to minimize error risks. See プロファイリング for an example of usage.

label Identifies the profiling event. The FUNC built-in KL constant can be used to identify current function.
source A StatisticSource can optionally be associated with the event for more context (its name will be attached to the event).


DisableFabricStatistics ()

Disable statistics collection, and collected data is lost (reset).


EnableFabricStatistics ()

Enables statistics collection. Previously constructed StatisticSource objects are ignored. See 統計(Statistics) for an example of usage.


EndProfilingEvent ( in Size key )

Records the end of a profiling event. The key must be the returned value of the associated BeginProfilingEvent call. It is recommended to use the AutoProfilingEvent helper, for simplicity and to minimize error risks.


FabricProfilingBeginFrame ( in Integer frameID, in Scalar time )

Marks the beginning of a new frame for profiling purposes.

frameID Frame index (if applicable)
time Frame start time (if applicable)


Boolean FabricProfilingEnabled ()

Returns true if profiling events recording is enabled.


Boolean FabricStatisticsEnabled ()

Return true if statistics collection is enabled.


ProfilingEvent[] GetProfilingEvents ()

Returns all the recorded profiling events. The level member of the ProfilingEvent struct defines event’s level within the flattened hierarchy (root == 0).

注釈

Events are not necessarily ordered by start time.


String GetProfilingReport ()

Returns all profiling events as a single String, providing a simple way to dump the results in the console from KL. See プロファイリング for an example of usage.


GetStatisticStrings ( out String lines[], out Size levels[] )

Returns the statistics as String lines and hierarchy levels (flattened hierarchy, root first). The Memory and GPUMemory records will be summed over the hierarchy.

lines Content of the gathered statistic records, in the format statsName1=value1 statsName2=value2 statsName2=value3 .... String values will have double-quotes.
levels Hierarchy level of the records, in flattened hierarchy order (0 == root, similar to an expanded tree view).


GetStatisticStrings ( out String lines[], out Size levels[], in String columnsToSelect[] )

Returns the statistics as String lines and hierarchy levels (flattened hierarchy, root first). The Memory and GPUMemory records will be summed over the hierarchy.

lines Content of the gathered statistic records, in the format statsName1=value1 statsName2=value2 statsName2=value3 .... String values will have double-quotes.
levels Hierarchy level of the records, in flattened hierarchy order (0 == root, similar to an expanded tree view).
columnsToSelect Columns (record names) to gather. If empty, all statistics will be gathered.


GetStatisticStrings ( out String lines[], out Size levels[], in String columnsToSelect[], in String columnsToSum[] )

Returns the statistics as String lines and hierarchy levels (flattened hierarchy, root first).

lines Content of the gathered statistic records, in the format statsName1=value1 statsName2=value2 statsName2=value3 .... String values will have double-quotes.
levels Hierarchy level of the records, in flattened hierarchy order (0 == root, similar to an expanded tree view).
columnsToSelect Columns (record names) to gather. If empty, all statistics will be gathered.
columnsTosum Statistic records that should be summed over the hierarchy. Typically, Memory and GPUMemory can be summed.


String[] GetStatisticsCSV ( in String columnsToSelect[] )

Returns the statistics as CSV-formatted lines. The first line contains the column names. The data is provided as a flattened hierarchy (root first), and the first column is the hierarchy level. The second column is the Name. The Memory and GPUMemory records will be summed over the hierarchy.

columnsToSelect Columns (record names) to gather. If empty, one column will be created for all defined statistic fields.


String[] GetStatisticsCSV ( in String columnsToSelect[], in String columnsToSum[] )

Returns the statistics as CSV-formatted lines. The first line contains the column names. The data is provided as a flattened hierarchy (root first), and the first column is the hierarchy level. The second column is the Name.

columnsToSelect Columns (record names) to gather. If empty, one column will be created for all defined statistic fields.
columnsTosum Statistic records that should be summed over the hierarchy. Typically, Memory and GPUMemory can be summed.


String[] GetStatisticsCSV ()

Returns the statistics as CSV-formatted lines. The first line contains the column names. The data is provided as a flattened hierarchy (root first), and the first column is the hierarchy level. The second column is the Name. One column will be created for all defined statistic fields. The Memory and GPUMemory records will be summed over the hierarchy.


String GetStatisticsReport ( in String columnsToSelect[] )

GetStatisticsReport returns a full statistics report as a single String, providing a simple way to dump the results in the console from KL. The Memory and GPUMemory records will be summed over the hierarchy.

columnsToSelect Columns (record names) to gather. If empty, all statistics will be gathered.


String GetStatisticsReport ( in String columnsToSelect[], in String columnsToSum[] )

Returns a full statistics report as a single String, providing a simple way to dump the results in the console from KL.

columnsToSelect Columns (record names) to gather. If empty, all statistics will be gathered.
columnsTosum Statistic records that should be summed over the hierarchy. Typically, Memory and GPUMemory can be summed.


String GetStatisticsReport ()

GetStatisticsReport returns a full statistics report as a single String, providing a simple way to dump the results in the console from KL. The Memory and GPUMemory records will be summed over the hierarchy. See 統計(Statistics) for an example of usage.


RegisterToFabricStatistics ( in Ref<StatisticSource> source )

Registers a statistic source if statistics are enabled.

注釈

When used, the StatisticsAutoRegisterMember helper object takes care of calling this.


StartFabricProfiling ( in Scalar seconds )

Enables profiling events recording for a specific timelapse (in seconds). This timelapse will be only be checked when FabricProfilingBeginFrame is called (frame granularity). See プロファイリング for an example of usage.


StartFabricProfiling ()

Enables profiling events recording until StopFabricProfiling is called.


StartFabricProfilingFrames ( in Size frameCount )

Enables profiling events recording for a certain number of frames.


StopFabricProfiling ()

Stops the profiling events recording. See プロファイリング for an example of usage.


UnregisterFromFabricStatistics ( in Ref<StatisticSource> source )

Unregisters a statistic source. This must be called before the source gets destroyed.

注釈

When used, the StatisticsAutoRegisterMember helper object takes care of calling this.