-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new debug feature: Performance Monitor. #1019
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea and I'd be happy to take this, with a few minor changes.
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.
|
@dvander, thanks for help |
On which platforms did you test this ? |
amxmodx/amx.cpp
Outdated
@@ -4173,3 +4173,43 @@ int AMXAPI amx_GetStringOld(char *dest,const cell *source,int use_wchar) | |||
dest[len]='\0'; /* store terminator */ | |||
return AMX_ERR_NONE; | |||
} | |||
|
|||
|
|||
#include <chrono> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it allowed to use STL instead of AMTL in amxmodx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WPMGPRoSToTeMa yes possible in future need add clocks to AMTL and then use it in AMXMODX. I did not attach importance to your message until I ran with this issue: #1026
On Windows but I think < chrono > is portabled and can be used at any other OS. |
Authors are usually tasked with testing their code cross-platform. Maybe you can or someone can test the code on linux. Assuming it will work is not really a good practice, imo. @dvander can allow the this workflow to run now so that we can check if there are some compile time errors cross-platform and cross-toolkit. |
Stuff in std:: is by definition portable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few more minor comments.
Thanks, merged. |
@dvander, thanks |
How to disable performance monitor logs? |
impossible without this pull request : #1028 |
Description:
This is new feature for plugins debugging.
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.