-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
Add "--enable-profiler" flag to all the StackStorm services + CLI #5199
Conversation
@@ -65,7 +65,7 @@ | |||
from st2client.utils.logging import LogLevelFilter, set_log_level_for_all_loggers | |||
from st2client.commands.auth import TokenCreateCommand | |||
from st2client.commands.auth import LoginCommand | |||
|
|||
from st2client.utils.profiler import setup_regular_profiler |
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.
NOTE: st2client can't depend on st2common that's why we intentionally need to duplicate the code in this package.
This flag can be used to enable cProf based profiler for debugging and troubleshooting purposes.
oslo config for parsing CLI options.
Can we use a different profiler? Something like Scalene? |
@blag We probably could for code which doesn't rely on eventlet. For most rest of the code which relies on eventlet we probably can't use it (unless that profiler knows how to handle eventlet code and context switching). |
@Kami looks like all you have to do is re-sign the CLA (which we changed recently to say Linux Foundation instead of one of the previous StackStorm stewards). |
This pull request adds
--enable-profiler
flag to all the StackStorm services + CLI which can be used to profiler the code using cProf based profiler during development and troubleshooting.Keep in mind that cProf offers only basic information and usually when drilling down (into a function) you need to use line profiler, but this may not working as expected our of the box due to our usage of eventlet (need to add some docs on that).