11 #include "../clib/rawtypes.h" 20 #define DEF_PROFILEVAR( counter ) \ 21 unsigned int prf_##counter, prf_last_##counter, prf_last_##counter##_per_min 23 #define CLOCK_PROFILEVAR( timer ) \ 24 clock_t tmr_##timer##_clocks_this_min, tmr_##timer##_clocks_last_min, tmr_##timer##_clock_start 85 #define INC_PROFILEVAR( counter ) ++Core::stateManager.profilevars.prf_##counter 86 #define SET_PROFILEVAR( counter, newvalue ) Core::stateManager.profilevars.prf_##counter = newvalue 87 #define INC_PROFILEVAR_BY( counter, amount ) Core::stateManager.profilevars.prf_##counter += amount 89 #define TICK_PROFILEVAR( counter ) \ 92 Core::stateManager.profilevars.prf_last_##counter##_per_min = \ 93 Core::stateManager.profilevars.prf_##counter - \ 94 Core::stateManager.profilevars.prf_last_##counter; \ 95 Core::stateManager.profilevars.prf_last_##counter = \ 96 Core::stateManager.profilevars.prf_##counter; \ 99 #define GET_PROFILEVAR( counter ) Core::stateManager.profilevars.prf_##counter 100 #define GET_PROFILEVAR_PER_MIN( counter ) \ 101 Core::stateManager.profilevars.prf_last_##counter##_per_min 103 #define START_PROFILECLOCK( timer ) \ 104 Core::stateManager.profilevars.tmr_##timer##_clock_start = clock() 105 #define STOP_PROFILECLOCK( timer ) \ 106 Core::stateManager.profilevars.tmr_##timer##_clocks_this_min += \ 107 clock() - Core::stateManager.profilevars.tmr_##timer##_clock_start 108 #define ROLL_PROFILECLOCK( timer ) \ 111 Core::stateManager.profilevars.tmr_##timer##_clocks_last_min = \ 112 Core::stateManager.profilevars.tmr_##timer##_clocks_this_min; \ 113 Core::stateManager.profilevars.tmr_##timer##_clocks_this_min = 0; \ 115 #define GET_PROFILECLOCK( timer ) Core::stateManager.profilevars.tmr_##timer##_clocks_last_min 116 #define GET_PROFILECLOCK_MS( timer ) \ 117 ( static_cast<unsigned int>( Core::stateManager.profilevars.tmr_##timer##_clocks_last_min * \ 118 1000.0 / Core::CLOCKS_PER_SEC ) )
size_t last_script_passes_activity
CLOCK_PROFILEVAR(npc_search)
size_t last_mapcache_misses
size_t last_nonbusy_sysload_cycles
std::atomic< size_t > script_passes_activity
size_t last_script_passes_noactivity
size_t nonbusy_sysload_cycles
size_t last_sysload_nprocs
size_t last_mapcache_hits
size_t last_busy_sysload_cycles
std::atomic< size_t > script_passes_noactivity
size_t busy_sysload_cycles