mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Add log regarding benchmark logic - and incrementing call count
This commit is contained in:
parent
5b0525d2e2
commit
977ed2f103
@ -39,7 +39,7 @@ rarch_perf_tick_t rarch_get_perf_counter(void);
|
||||
|
||||
#define RARCH_PERFORMANCE_INIT(X) static rarch_perf_counter_t X
|
||||
#define RARCH_PERFORMANCE_START(X) ((X).start = rarch_get_perf_counter())
|
||||
#define RARCH_PERFORMANCE_STOP(X) do { (X).total += rarch_get_perf_counter() - (X).start; (X).call_cnt++; } while(0)
|
||||
#define RARCH_PERFORMANCE_STOP(X) do { (X).total += rarch_get_perf_counter() - (X).start; (X).call_cnt++; } while(0) /* TODO: we should increment at PERFORMANCE_START instead of PERFORMANCE_STOP since sometimes we cannot assume that we don't prematurely exit out of the function */
|
||||
|
||||
#ifdef _WIN32
|
||||
#define RARCH_PERFORMANCE_LOG(functionname, X) RARCH_LOG("[PERF]: Avg (%s): %I64u ticks.\n", functionname, (X).total / (X).call_cnt)
|
||||
|
Loading…
Reference in New Issue
Block a user