Added new debug feature: Performance Monitor. (#1019)

* Performance Monitor.

Search big performance issues for any plugin that in debug mode. No server slow down.
Output is plugin and function name, and server execution lag in ms. Output target: current amxlog file.

* Adding cvar to enable perflog. Force for all plugin if amx_debug is 2.

* Update cvar name

* Use another clock from chrono

* Fix debug check

* Skip internal amxx exec

* Move includes

* Fix debug check in amx_ExecPerf

* Tried to compile without min/max undefined
This commit is contained in:
Unreal Karaulov
2021-12-06 05:38:49 +03:00
committed by GitHub
parent 6e8554d1d2
commit 8ee3da24cb
12 changed files with 88 additions and 12 deletions

View File

@ -218,3 +218,14 @@ amx_idle_ignore_immunity 1
//
// Default value: 4
amx_unstuck_frequency 4
// Performance monitor
//
// If function executed more than amx_perflog_ms milliseconds
// print plugin and function name to current amxmodx log file.
//
// Time in milliseconds
// Default value: 1.0
//
amx_perflog_ms 1.0