...
However, in order to see the results of the instrumentation, we need to turn on the observation of stats. Specifically, we need to enable Listeners
Listeners that will pull data out of the system for presentation or analysis. Depending on the listener(s) that are enabled you may see output to a data file or live stats to an in-app HUD, or anything in between.
...
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.
...
The stats configuration file is provided to the prman
command via the option "-statsconfig <filename> " option:
Code Block |
---|
prman -statsconfig /path/to/checkpoint_stats.ini /path/to/rib/scene.rib |
See JSON Report Listener reference page for JSON output configuration options.
...
The default configuration filename is "stats.ini" . If prman
is If prman is not provided a config file via the -statsconfig optionstatsconfig 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.
The stats system will search for the configuration file in the following order:
Order | Location | Default |
---|---|---|
1 | /stats/ |
configpath setting in rendermn.ini | .:${RMANTREE}/etc | |
2 |
| none |
3 | prman -statsconfig </path/to/filename. |
ini> | stats.ini |
Configuration files are not merged if more than one is found. The last one found wins.
...
Which will load the stats configuration from from "/my/test/directory/debug_stats.ini "
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. |
...
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).
...
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.
Code Block | ||
---|---|---|
| ||
# Set this to 1 for extra information when parsing this file
verbose 1
|
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:
Code Block | ||
---|---|---|
| ||
# Stats processing log level.
# Range is 0 (none) to 5 (debug output). Default is 3 (warnings)
logLevel 3 |
The default (3) is set to output warnings and errors only. Set this to 4
for high-level informational messages, or 5
for detailed debugging messages.
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:
Code Block |
---|
prman -statsdebuglevel 5 ... |
The above command will set the log level to 5 ("debug") until a config file is found, at which point the log level specified in the config file will take precedence.