alliedmodders / amxmodx

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

Performance monitor #1016

Closed UnrealKaraulov closed 2 years ago

UnrealKaraulov commented 2 years ago

I need add performance monitor for test, how to build it with old glibc version?(

UnrealKaraulov commented 2 years ago

How to build it for old glibc version as in website amxmodx.org ?

dvander commented 2 years ago

What is going on in this PR? There's no description and there's tons of changes that seem unrelated.

UnrealKaraulov commented 2 years ago

@dvander I tried to add performance monitor (If function executed with big time, print it to log)

Changes only in 3 cpp files. Another changes (yml) I tried to compile for old version glibc (for game hosting support)

All works but I can't test it with old linux (old glibc as released in amxmodx website)

dvander commented 2 years ago

I'm not sure what your glibc troubles are, but buildbot uses Debian 7 + clang-3.8 to build AMX Mod X.

UnrealKaraulov commented 2 years ago

@dvander I do merge all commits what I can do

I don't know how to make it easy, I tried move performance monitor to amx_Exec function, but got problems with includes like log/pluginmanager etc.

I just propose this feature, possible someone can do it as need. But how to get binaries from buildbot ? actions from github got errors like need version GLIBC_2.29 or version GLIBCXX_3.4.19

UnrealKaraulov commented 2 years ago

@dvander example output of highload functions (it normally for plugin_init)

L 12/01/2021 - 10:03:28: [admincmd.amxx] performance issue 2. Function plugin_init executed more than 3 ms. L 12/01/2021 - 10:03:28: [cmdmenu.amxx] performance issue 2. Function plugin_init executed more than 10 ms. L 12/01/2021 - 10:03:28: [plmenu.amxx] performance issue 2. Function plugin_init executed more than 2 ms. L 12/01/2021 - 10:03:28: [mapsmenu.amxx] performance issue 2. Function plugin_init executed more than 3 ms. L 12/01/2021 - 10:03:28: [pluginmenu.amxx] performance issue 2. Function plugin_init executed more than 2 ms. L 12/01/2021 - 10:03:28: [adminchat.amxx] performance issue 2. Function plugin_init executed more than 2 ms.

UnrealKaraulov commented 2 years ago

Closed for update!

UnrealKaraulov commented 2 years ago

Code rewrite and updated in new pr: https://github.com/alliedmodders/amxmodx/pull/1019