Overview
The stats system is split into two distinct categories:
...
Currently, the system does not have any listeners configured by default but they can be enabled using a configuration file. In future releases, there will be one or more listeners configured by default and there will be configuration UI in each bridge product.
Configuration File
The stats configuration file (default name: stats.ini
) holds the basic default settings for the stats session, a list of listeners to attach, and per-listener rules for metric data to be observed by each listener.
...
See JSON Report Listener reference page for JSON output configuration options.
Config File Search Order
The default configuration filename is "stats.ini"
. If prman
is not provided a config file via the -statsconfig
option, or if the filename given is a relative filename, then the stats configuration search path order will be used to attempt to find a configuration file.
...
Note |
---|
Listener control and configuration are not yet dynamic. You are able to enable and disable listeners without recompiling, but you need to restart the render in order to see the configuration change. The same applies to changing which metrics a listener is observing. We are still polishing the mechanisms for enabling and disabling listeners and metrics mid-render, and eventually a front-end configuration UI. |
DCC Configuration
Blender
RfB uses the prman
command-line mechanism as described above.
Houdini
If the RMAN_STATS_CONFIG_PATH
environment variable is set RfH will use that search path to look for a file named stats.ini.
If no file is found, or if that environment variable is not set then the default configuration will be used.
Katana
If the RMAN_STATS_CONFIG_PATH
environment variable is set RfK will use that search path to look for a file named stats.ini.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<katana release="4.0v2" version="4.0.2.000001"> <node name="__SAVE_exportedNodes" type="Group"> <node baseType="OpScript" edited="true" name="StatsConfiguration" ns_colorb="0.050000" ns_colorg="0.260000" ns_colorr="0.090000" ns_errorGlow="0.000000" ns_fromContext="legacy" selected="true" type="OpScript" x="143.024861" y="-253.437185"> <port name="i0" source="PrmanGlobalStatements.out" type="in"/> <port name="out" type="out"/> <group_parameter name="StatsConfiguration"> <string_parameter name="CEL" value="((/root))"/> <string_parameter name="location" value="/root/world/location"/> <group_parameter name="script"> <string_parameter name="lua" value="
-- Default: 'stats.ini'
local configFile = Interface.GetOpArg('user.configFile'):getValue()

-- Default: '.'
-- Can be overriden with RMAN_STATS_CONFIG_PATH
local configSearchPath = Interface.GetOpArg('user.configSearchPath'):getValue()

-- Default: $RMANTREE/lib/plugins/listeners 
-- Can be overriden with RMAN_LISTENER_SEARCHPATH
local listenerSearchPath = Interface.GetOpArg('user.listenerSearchPath'):getValue()

Interface.SetAttr(
 'prmanGlobalStatements.stats.sessionConfigFile', 
 StringAttribute(configFile))

Interface.SetAttr(
 'prmanGlobalStatements.stats.sessionConfigSearchPath', 
 StringAttribute(configSearchPath))

Interface.SetAttr(
 'prmanGlobalStatements.stats.listenerSearchPath',
 StringAttribute(listenerSearchPath))

"/> </group_parameter> <string_parameter name="executionMode" value="immediate"/> <string_parameter name="applyWhere" value="at locations matching CEL"/> <string_parameter name="applyWhen" value="during op resolve"/> <string_parameter name="modifierNameMode" value="node name"/> <string_parameter name="modifierName" value="modifier"/> <string_parameter name="resolveIds" value=""/> <number_parameter name="recursiveEnable" value="0"/> <string_parameter name="disableAt" value=""/> <string_parameter name="inputBehavior" value="by index"/> <number_parameter name="multisampleUserOpArgs" value="0"/> <group_parameter hints="{}" name="user"> <string_parameter hints="{'widget': 'fileInput'}" name="configFile" value="stats.ini"/> <string_parameter expression="'.:'+getenv("RMANTREE", ".")+'/etc'" hints="{}" name="configSearchPath"/> <string_parameter expression="getenv("RMANTREE", "./")+'/lib/plugins/listeners'" hints="{}" name="listenerSearchPath"/> </group_parameter> </group_parameter> </node> </node> </katana> |
Maya
If the RMAN_STATS_CONFIG_PATH
environment variable is set RfM will use that search path to look for a file named stats.ini.
If no file is found, or if that environment variable is not set then the default configuration will be used.
Solaris
The new stats are not yet supported in Solaris.
Built-in Listeners
Below is a table of currently available listeners and their use case(s).
Listener Type | Description | Use | Notes |
---|---|---|---|
jsonreport | Write hierarchical metric data to a JSON file. | An end-of render JSON report, including checkpoint/resume support. | Default is currently to write all checkpoints but this can be disabled in the listener configuration. |
print | Write metric data to std::out. | Writes raw output to the console. | A "Hello World" of example listeners. |
snapshot | Write a summary of render stats to the console. | An end-of-render summary that is comparable with the legacy stats summary, plus optional extra metric data. The summary is also available mid-render by specifying "trigger" events. | For RIB or Preview renders only, does not yet write a snapshot when Live/IPR renders are canceled. |
telemetry | Stream of data or report to CSV | Benchmarks or debugging | Can be an end-of-render CSV report written to disk, or can be a live stream of metrics to the console as the render progresses. |
Troubleshooting
Normally the stats system does its work silently, however for those situations when things aren't working as expected there are built-in mechanisms to get diagnostics on the diagnostics system.
Config File Parsing
When getting started it can be useful to see more information about the parsing of the configuration file. Enabling the verbose
option will print detailed config file parsing diagnostics to the console.
...
This will automatically be enabled when the log level is set to Debug (5).
Stats System Diagnostics
Stats has its own logging mechanism that can be dialed up for more information about what's happening internally. This can be set in the configuration file using the following option:
...
Note: this log level is independent from prman's log level, as a means to separate renderer diagnostic logging from the diagnostic logging of the statistic system itself.
Command-line Debug Flag
If a problem is occurring before the configuration file is read, or if it's unclear if a configuration file is being read at all, there is a hidden command-line option for adjusting the level of pre-config file logging:
...