alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
489 stars 197 forks source link

New cvar amx_perfmon #1028

Closed UnrealKaraulov closed 1 year ago

UnrealKaraulov commented 2 years ago

New cvar amx_perfmon

Now possible to disable amx_permon, or enable for it all plugins.

  1. Disable
  2. Enable for debug plugins
  3. Enable for all plugins
UnrealKaraulov commented 2 years ago

@dvander you still alive? 👽

Possible to merge this pr? It can add ability to use performance monitoring for plugins in release mode, more accurate than in debug.

dvander commented 2 years ago

Is debug mode required for perf monitor? Eg, should amx_debug be a bitmask, or a level?

UnrealKaraulov commented 2 years ago

Is debug mode required for perf monitor? Eg, should amx_debug be a bitmask, or a level? Perf monitor at this time works only for plugins what in debug mode. But this commit add possibly to use it for all plugins, even in release mode.

At this time in master, amx_debug can be 1, and 2. 0 = nothing (as 1) 1 = put in debug only plugins marked 'debug' in plugins.ini 2 = put all plugins in debug (and performance monitor) 3 = nothing (as 1)

This commit add new amx_debug mode '3' 3 = put in debug only plugins marked 'debug' in plugins.ini and force to use performance monitor for all plugins, even if not marked as debug.

I can do it as bitmask if you think that it better.

dvander commented 2 years ago

It seems like it'd be better to keep amx_debug as-is, and then have a separate flag for the performance monitor.

UnrealKaraulov commented 2 years ago

Updated.

It seems like it'd be better to keep amx_debug as-is, and then have a separate flag for the performance monitor.

Something like this : https://github.com/alliedmodders/amxmodx/pull/1028/files ??

@dvander Now possible to disable amx_perf, or enable for it all plugins.

  1. Disable
  2. Enable for debug plugins
  3. Enable for all plugins

I think use it in 2nd mode is more effective because now no debugger affect to code execution speed!

UnrealKaraulov commented 2 years ago

@dvander This is for previous PR. Now performance monitoring can be Disabled/Enabled for debug plugins/Enabled for anything. You can merge this PR? (because monitor can't be disabled without this fix)

stambeto2006 commented 2 years ago

Will it be updated soon for use?

UnrealKaraulov commented 2 years ago

I can compile it in another branch in GitHub actions with artifacts upload. But better if this will be merged. Possible all authors of amxx is offline ;(

UnrealKaraulov commented 2 years ago

@stambeto2006 you can download this version here https://github.com/UnrealKaraulov/amxmodx/actions/runs/1982492726

rtxa commented 1 year ago

Hi @dvander,

Sorry for tagging you. Would you mind taking a look to this PR? The new performance monitor feature is good, but unfortunately it can't be disabled. Seems to me that @UnrealKaraulov made a very simple solution for this issue, where you can disabled it forever, enabled it only for plugins in debug mode or enabled it for all plugins.

Otherwise, it would obsfucated important information for developers not looking for this kind of info, or server owners where plugins are set in debug mode for other type of errors.

A workaround for this issue would be to set amx_perflog_ms on amxx.cfg to 0.0 and it would disable the performance monitor log.

UnrealKaraulov commented 1 year ago

@dvander @Arkshine америкосы