libretro.drivers.perf.default¶
PerfDriver implementation backed by time for timestamps.
See also
PerfDriverThe protocol this driver implements.
Classes
The default |
- class DefaultPerfDriver[source]¶
Bases:
PerfDriverThe default
PerfDriverused when aSessionis given no other.Backed by the standard
timemodule (time.time_ns()for wall-clock andtime.process_time_ns()for the perf counter).See also
PerfDriverThe protocol this class implements.
- property perf_counters¶
A live mapping of registered performance-counter identifiers to their structs.
- get_time_usec()[source]¶
Return the current wall-clock time in microseconds.
See also
retro_perf_get_time_usec_tThe C function pointer type whose signature this method implements.
- Return type:
- get_perf_counter()[source]¶
Return the current value of the high-resolution performance counter.
Units are driver-defined but consistent within a single process.
See also
retro_perf_get_counter_tThe C function pointer type whose signature this method implements.
- Return type:
- get_cpu_features()[source]¶
Return a bitmask of CPU features available to the core.
See also
CpuFeaturesBit flags describing each supported CPU feature.
- Return type:
- perf_register(counter)[source]¶
Register a new performance counter with the driver.
- Parameters:
counter (
retro_perf_counter) – The counter struct to register.
See also
retro_perf_register_tThe C function pointer type whose signature this method implements.
- Return type:
- perf_start(counter)[source]¶
Start measuring a previously registered performance counter.
- Parameters:
counter (
retro_perf_counter) – The counter to start.
See also
retro_perf_start_tThe C function pointer type whose signature this method implements.
- Return type:
- perf_stop(counter)[source]¶
Stop measuring a previously started performance counter.
- Parameters:
counter (
retro_perf_counter) – The counter to stop.
See also
retro_perf_stop_tThe C function pointer type whose signature this method implements.
- Return type:
- perf_log()[source]¶
Emit accumulated performance-counter measurements to the driver’s log sink.
See also
retro_perf_log_tThe C function pointer type whose signature this method implements.
- Return type:
- classmethod __new__(*args, **kwargs)¶