mi::neuraylib::IRender_counters Class Reference
[Rendering and Picking]
Description
Performance counters for render modes. Render modes can be instrumented with various counters to measure performance. These counters are organized in a hierarchical fashion. This interface supports the discovery of existing counters and their hierarchy, as well as the retrieval of counter values.
Each counter is identified by a string key. The key describes the path in the hierarchy. A path consists of names delimited by a dot, e.g., "textures.nb_objs". The empty string represents the root of the hierarchy, a delimiter is not necessary here, i.e., "textures" would be a valid key just below the root, not ".textures".
Note that the counter hierarchy is not required to be stable.
Public Member Functions
- virtual const char* get_description( const char* key) const =0
- Returns the description for a given key. More...
- virtual const char* get_subkey( const char* key, Size index) const =0
- Returns a subkey for a given key. More...
- virtual Size get_subkeys_size( const char* key) const =0
- Returns the number of subkeys of a key. More...
- virtual const char* get_unit( const char* key) const =0
- Returns the unit of the value associated with a given key. More...
- virtual bool get_value( const char* key, Float64& value) const =0
- Returns the value associated with a given key. More...
Member Functions
- virtual const char* mi::neuraylib::IRender_counters::get_description( const char* key) const [pure virtual]
-
Returns the description for a given key.
Parameters
- key
- The key for which the description shall be returned.
Returns
A description of the meaning of the key key .
- virtual const char* mi::neuraylib::IRender_counters::get_subkey( const char* key, Size index) const [pure virtual]
-
Returns a subkey for a given key.
Parameters
- key
- The key for which a particular subkey shall be returned. The empty string can be used to retrieve the top-level subkeys.
- index
- The index of the subkey in question. The valid index range is from 0 to get_subkeys_size() - 1.
Returns
The requested subkey, or NULL in case of failure. Note that the returned value is actually the last path component of the subkey, not the complete subkey.
- virtual Size mi::neuraylib::IRender_counters::get_subkeys_size( const char* key) const [pure virtual]
-
Returns the number of subkeys of a key.
Parameters
- key
- The key for which the number of subkeys shall be returned. The empty string can be used to retrieve the top-level subkeys.
Returns
The number of subkeys this key has.
- virtual const char* mi::neuraylib::IRender_counters::get_unit( const char* key) const [pure virtual]
-
Returns the unit of the value associated with a given key.
Parameters
- key
- The key for which the unit of the associated value shall be returned.
Returns
The unit of the value associated with key , or NULL if there is no unit for this key.
- virtual bool mi::neuraylib::IRender_counters::get_value( const char* key, Float64& value) const [pure virtual]
-
Returns the value associated with a given key.
Parameters
- key
- The key for which the associated value shall be returned.
- value
- The value associated with key.
Returns
true in case of success, false in case of failure (e.g. the key is invalid).