-
Notifications
You must be signed in to change notification settings - Fork 363
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
Speed-up analysis time with thread pool #1493
Comments
* if property set, print duration of each SquidCheck to `sonar.cxx.squidprofiler.out=<abs path>` * currently only duration is logged * for parallel execution we can log start/stop time also, in order to check the utilization level (see SonarOpenCommunity#1493) * output: semi-JSON format for later python analysis (e.g. in http://jupyter.org/) `{ "visitor": "%s", "source_file": "%s", "duration_ms": "%d" }`
* introduce the hidden property sonar.cxx.squidprofiler.out=<path> * if property set, decorate each AstVisitor (all squid checks, CPD, highlighting etc), so that it tracks the elapsed time per source file * dump this duration as well as other invocation details to <path> in JSON format * currently only duration is logged * for parallel execution we can log start/stop time also, in order to check the CPU utilization level (see SonarOpenCommunity#1493) * output: semi-JSON format for python analysis (e.g. in http://jupyter.org/) `{ "visitor": "%s", "source_file": "%s", "duration_ms": "%d" }`
I would also like to see this feature. Our project spends 95% of its time in the CxxSquidSensor. I can try to work on this if it is still desired. |
Hi @neontty, help is always welcome! Think there are still many things possible to improve speed:
I’m not sure if preprocessing and AST creation can be paralyzed? Maybe you have to look first to https://github.com/SonarSource/sslr if it is possible. Regards |
As an user I like to have shorter cxx-plugin scanner times.
Hint:
At the moment we are using only one thread for analysis. Most of the current analysis time is spend in CxxSquidSensor.execute
Running scanner.scanFiles in a thread pool could speed-up the analysis.
Sample:
https://github.com/SonarSource/sonar-python/pull/106/files
The text was updated successfully, but these errors were encountered: