【问题标题】:Sonarqube project analyse takes more and more timeSonarqube 项目分析需要越来越多的时间
【发布时间】:2017-02-26 12:41:37
【问题描述】:

使用 Jenkins 1.642.2 和 SonarQube 5.6.1 对我的所有 maven 项目进行代码分析。

我使用:sonar-java-plugin-4.2.jar

我尝试了 Sonarqube 扫描和 sonarqube runner,当我在 Jenkins 中开始构建时遇到了同样的问题:

$SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_AUTH_TOKEN

使用 sonarqube 5.6.1 需要很长时间,但使用 sonarqube 4.5.1 效果很好

INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=48ms
INFO: Sensor JavaSquidSensor
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
WARN: Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property
INFO: JavaClasspath initialization (done) | time=0ms
INFO: JavaTestClasspath initialization
WARN: Bytecode of dependencies was not provided for analysis of test files, you might end up with less precise results. Bytecode can be provided using sonar.java.test.libraries property
INFO: JavaTestClasspath initialization (done) | time=1ms
INFO: Java Main Files AST scan
INFO: 140 source files to be analyzed
INFO: 66/140 files analyzed, current file: /var/lib/jenkins/jobs/INT_FR_Quality-test/workspace/MEjb/accDocMgr/src/main/java/com/jd/boas/process/billing/accdocmgr/impl/AccDocMgrMapper.java
INFO: Java Main Files AST scan (done) | time=15608ms
INFO: Java Test Files AST scan
INFO: 140/140 source files have been analyzed
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan (done) | time=1ms
INFO: Sensor JavaSquidSensor (done) | time=16072ms
INFO: Sensor SCM Sensor
INFO: SCM provider for this project is: svn
INFO: 0/0 source files have been analyzed
INFO: 140 files to be analyzed
INFO: 1/140 files analyzed
INFO: 4/140 files analyzed
INFO: 7/140 files analyzed
INFO: 9/140 files analyzed
INFO: 12/140 files analyzed
.
.
.
INFO: 136/140 files analyzed
INFO: 138/140 files analyzed
INFO: 140/140 files analyzed
INFO: Sensor SCM Sensor (done) | time=1065164ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=114ms
INFO: Sensor Code Colorizer Sensor
INFO: Sensor Code Colorizer Sensor (done) | time=5ms
INFO: Sensor CPD Block Indexer
INFO: JavaCpdBlockIndexer is used for java
INFO: Sensor CPD Block Indexer (done) | time=305ms

项目扫描需要10多个小时!!! 请帮忙

【问题讨论】:

  • 除了可能需要大约 17 分钟运行的 SCM 传感器之外,您提供的日志中绝对没有任何帮助或指示对项目进行 10 小时分析。你能分享更多信息吗?也许更相关的日志?试着找出时间花在哪里?
  • 我的项目有很多模块,所以我测试了一个模块,但我看到时间花在 SCM 传感器上,但是当我添加 -Dsonar.scm.disabled=true 时,我在 sonarqube 中分析了 0 个文件我尝试使用 svn 插件 1.2 和 1.3 有相同的问题日志pastebin.com/0q1hNJWf:

标签: jenkins java-8 sonarqube maven-3 sonarqube-scan


【解决方案1】:

尝试一个没有以前数据的新数据库。分析还长吗?如果不是,则意味着您当前的数据库必须重新索引等等

【讨论】:

    猜你喜欢
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-04
    • 1970-01-01
    • 1970-01-01
    • 2020-09-13
    相关资源
    最近更新 更多