OpenXRVendorPerformanceMetrics
Inherits: Object
Provides API for interacting with OpenXR vendor performance metrics extensions.
Description
Provides API for interacting with OpenXR vendor performance metrics extensions.
Properties
bool |
|
Methods
PackedStringArray |
|
bool |
is_enabled ( ) |
Dictionary |
query_performance_metrics_counter ( String counter_path ) |
Enumerations
enum PerformanceMetricsCounterFlags:
PerformanceMetricsCounterFlags PERFORMANCE_METRICS_COUNTER_FLAGS_ANY_VALUE_VALID_BIT = 1
Indicates the data returned by query_performance_metrics_counter is valid.
PerformanceMetricsCounterFlags PERFORMANCE_METRICS_COUNTER_FLAGS_UINT_VALUE_VALID_BIT = 2
Indicates the uint_value
returned by query_performance_metrics_counter is valid.
PerformanceMetricsCounterFlags PERFORMANCE_METRICS_COUNTER_FLAGS_FLOAT_VALUE_VALID_BIT = 4
Indicates the float_value
returned by query_performance_metrics_counter is valid.
enum PerformanceMetricsCounterUnit:
PerformanceMetricsCounterUnit PERFORMANCE_METRICS_COUNTER_UNIT_GENERIC = 0
The performance counter unit is generic/unspecified.
PerformanceMetricsCounterUnit PERFORMANCE_METRICS_COUNTER_UNIT_PERCENTAGE = 1
The performance counter unit is a percentage.
PerformanceMetricsCounterUnit PERFORMANCE_METRICS_COUNTER_UNIT_MILLISECONDS = 2
The performance counter unit is milliseconds.
PerformanceMetricsCounterUnit PERFORMANCE_METRICS_COUNTER_UNIT_BYTES = 3
The performance counter unit is bytes.
PerformanceMetricsCounterUnit PERFORMANCE_METRICS_COUNTER_UNIT_HERTZ = 4
The performance counter unit is hertz.
Property Descriptions
bool capture_performance_metrics = false
void set_capture_performance_metrics ( bool value )
bool is_capturing_performance_metrics ( )
If true
, the performance metrics system is currently capturing data.
Method Descriptions
PackedStringArray get_performance_metrics_counter_paths ( )
Returns a PackedStringArray
of counter paths that may be passed to query_performance_metrics_counter.
bool is_enabled ( )
Returns true
if the singleton is enabled; otherwise false
.
Dictionary query_performance_metrics_counter ( String counter_path )
Returns a Dictionary containing the following keys:
counter_path
(String): the counter path associated with this data.counter_flags
(int): a bitfield of PerformanceMetricsCounterFlags indicating both if this data is valid and what data fields are valid.counter_unit
(PerformanceMetricsCounterUnit): The unit associated with the data value.uint_value
(int): The counter value in unsigned integer format. This key exists ifcounter_flags
contains PERFORMANCE_METRICS_COUNTER_FLAGS_UINT_VALUE_VALID_BIT.float_value
(float): The counter value in floating point format. This key exists ifcounter_flags
contains PERFORMANCE_METRICS_COUNTER_FLAGS_FLOAT_VALUE_VALID_BIT.
The returned Dictionary may be empty if an invalid counter path is provided, or if the returned data is not considered valid by the runtime.