简体   繁体   English

具有MSBuild Runner的C#插件的SonarQube需要大量时间

[英]SonarQube with C# plugin with MSBuild Runner takes a lot of time

Currently I have an instance of SonarQube 5.1.2 with C# plugin and MSBuild runner in order to analyze a 1.200.000 LOC project, the analysis is taking between 16 and 20 hours. 目前,我有一个带有C#插件和MSBuild运行器的SonarQube 5.1.2实例,以分析1.200.000 LOC项目,分析过程需要16到20个小时。 Digging into the logs, the building process (including the execution of test) takes about 2 hours, starting from there, SonarQube start its analysis. 探究日志,构建过程(包括执行测试)大约需要2个小时,SonarQube从那里开始进行分析。

SonarQube is setup as it comes out of the box, it is installed in a machine with 8Gb in RAM, 4 processors. SonarQube出厂时即已进行安装,安装在具有8Gb RAM,4个处理器的计算机中。 Usually, the analysis process only uses 20% of the CPU and 1.5 GB of RAM. 通常,分析过程仅使用20%的CPU和1.5 GB的RAM。

What actions should I take to reduce the analysis time? 我应该采取什么措施来减少分析时间?

Upgrade to the latest release version of SonarQube. 升级到SonarQube的最新发行版。 Before SonarQube 5.2, a database connection was established from the analysis machine to the database, and there were a lot of round-trips to upload the analysis results. 在SonarQube 5.2之前,已建立了从分析机到数据库的数据库连接,并且有很多往返行程来上传分析结果。

Since 5.2, the analysis machine zips the analysis results and sends it to the server, which will process it and store it in the database in a much more optimized way. 从5.2开始,分析机压缩分析结果并将其发送到服务器,服务器将对其进行处理并将其以更为优化的方式存储在数据库中。

Also feel free to investigate and report what the bottleneck is once you're on the latest released versions and if you still face performance issues. 如果您使用的是最新发行版本,并且仍然遇到性能问题,也可以随时进行调查并报告瓶颈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM