我的声纳分析需要很长时间才能完成。最初大约需要20-30分钟。后来增加到1小时以上。现在5个月后要花5个小时。
有人能提出原因和如何纠正同样的问题吗。
我使用SonarQube4.4和postgresql 9.3dB。声纳分贝几乎占据了40克的空间。
如果你查看下面的日志,你会发现大部分时间都花在了IndexProjectPostJob上。

08:53:47.437 INFO  - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
08:53:48.687 INFO  - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
12:56:24.924 INFO  - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
12:56:26.601 INFO  - -> Keep one snapshot per day between 2015-06-10 and 2015-07-07

最佳答案

如果每次sonar分析代码时都要运行大量的Junit/集成测试,那么在完成之前可能需要很长时间。
如果是这样的话,也许你应该将测试的一部分(例如使用db的一次)移到一个单独的声纳项目中,你将偶尔运行一次。只运行你的小型和真实的单元测试。

关于postgresql - Sonar 分析需要很长时间,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31290413/

10-13 08:07