Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-76183

Coverage plugin runs for 4 minutes without logging any actions?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • coverage-plugin
    • None
    • Jenkins Version: 2.516.3
      Coverage Plugin Version: 2.2941.v08df75b_767f1
      Git Forensics Version: 3.2088.v3a_896f5e4937

       

      I have been trying to track down performance issues in our CI jobs, and I noticed that the coverage plugin was taking four minutes to run, but when digging into the logs it looks like it's doing something for four minutes without logging anything. 

      `git rev-parse  HEAD^{commit}` runs nearly instantly, so it's not that.

      This is how we are invoking the plugin: 

      discoverGitReferenceBuild(referenceJob: "apps-builds/${env.CHANGE_TARGET}")  recordCoverage \
         enabledForFailure: true,
         failOnError: true,
         skipPublishingChecks: true,
         skipSymbolicLinks: true,
         tools: [[parser: 'COBERTURA', pattern: 'coverage.xml']],
         sourceCodeEncoding: 'UTF-8' 

      These are the corresponding logs:

      [2025-10-07T21:40:15.929Z] [Coverage] Recording coverage results
      [2025-10-07T21:40:15.929Z] [Coverage] Creating parser for Cobertura Coverage Reports
      [2025-10-07T21:40:15.929Z] [Coverage] Searching for all files in '/home/jenkins/workspace/workspace/apps' that match the pattern 'coverage.xml'
      [2025-10-07T21:40:15.929Z] [Coverage] Traversing of symbolic links: enabled
      [2025-10-07T21:40:15.929Z] [Coverage] -> found 1 file
      [2025-10-07T21:40:15.929Z] [Coverage] Successfully parsed file '/home/jenkins/workspace/workspace/apps/coverage.xml'
      [2025-10-07T21:40:15.929Z] [Coverage] MODULE: 100.00% (1/1)
      [2025-10-07T21:40:15.929Z] [Coverage] PACKAGE: 94.36% (452/479)
      [2025-10-07T21:40:15.929Z] [Coverage] FILE: 87.42% (2099/2401)
      [2025-10-07T21:40:15.929Z] [Coverage] CLASS: 87.42% (2099/2401)
      [2025-10-07T21:40:15.929Z] [Coverage] METHOD: 44.80% (14987/33453)
      [2025-10-07T21:40:15.929Z] [Coverage] LINE: 61.26% (148482/242382)
      [2025-10-07T21:40:15.929Z] [Coverage] BRANCH: 24.54% (38197/155653)
      [2025-10-07T21:40:15.929Z] [Coverage] LOC: 242382
      [2025-10-07T21:40:15.929Z] [Coverage] CYCLOMATIC_COMPLEXITY: 0
      [2025-10-07T21:40:15.929Z] [Coverage] Successfully processed file 'coverage.xml'
      [2025-10-07T21:40:16.040Z] [Coverage] Resolving source code files...
      [2025-10-07T21:40:16.040Z] [Coverage] Searching for source code files in '/home/jenkins/workspace/workspace/apps/src/main/java'
      [2025-10-07T21:40:16.040Z] [Coverage] -> resolved absolute paths for all 2401 source files
      [2025-10-07T21:40:16.042Z] The recommended git tool is: git
      [2025-10-07T21:40:16.048Z] using credential fb50c44c-fae0-4f16-9499-d9d212e04986
      [2025-10-07T21:40:16.090Z] The recommended git tool is: git
      [2025-10-07T21:40:16.096Z] using credential fb50c44c-fae0-4f16-9499-d9d212e04986
      [2025-10-07T21:40:16.052Z]  > git rev-parse HEAD^{commit} # timeout=10
      [2025-10-07T21:44:13.717Z] [Coverage] Obtaining result action of reference build
      [2025-10-07T21:44:13.717Z] [Coverage] Obtaining reference build from reference recorder
      [2025-10-07T21:44:13.717Z] [Coverage] -> Found 'apps-builds » main #2419'
      [2025-10-07T21:44:13.717Z] [Coverage] -> Using reference build 'apps-builds/main #2419'
      [2025-10-07T21:44:13.717Z] [Coverage] Calculating the code delta...
      [2025-10-07T21:44:13.717Z] [Coverage] -> Git delta calculator successfully created for SCM 'hudson.plugins.git.GitSCM@a7337bb' in working tree '/home/jenkins/workspace/workspace/apps'
      [2025-10-07T21:44:13.717Z] [Coverage] -> Using commit '0ba8677' as latest commit for build 'apps-multibranch » ci(tests): Attempt to speed up Jenkins CI by fixing timeout #2'
      [2025-10-07T21:44:13.717Z] [Coverage] -> Using commit 'fc7d683' as latest commit for build 'apps-builds » main #2419'
      [2025-10-07T21:44:13.717Z] [Coverage] -> Invoking Git delta calculator for determining the changes between commits '0ba8677' and 'fc7d683' in repository '/home/jenkins/workspace/workspace/apps'
      [2025-10-07T21:44:13.717Z] [Coverage] -> Start scanning for differences between commits...
      [2025-10-07T21:44:13.717Z] [Coverage] -> 1 files contain changes
      [2025-10-07T21:44:13.717Z] [Coverage] -> Creating the Git diff file
      [2025-10-07T21:44:13.717Z] [Coverage] -> Git code delta successfully calculated
      [2025-10-07T21:44:13.717Z] [Coverage] Preprocessing code changes...
      [2025-10-07T21:44:13.717Z] [Coverage] Successfully mapped SCM paths to coverage report paths
      [2025-10-07T21:44:13.717Z] [Coverage] Successfully verified that the coverage data matches with the code delta
      [2025-10-07T21:44:13.717Z] [Coverage] Obtaining code changes for files...
      [2025-10-07T21:44:13.717Z] [Coverage] Obtaining indirect coverage changes...
      [2025-10-07T21:44:13.717Z] [Coverage] Obtaining coverage delta for files...
      [2025-10-07T21:44:13.717Z] [Coverage] Calculating coverage deltas...
      [2025-10-07T21:44:13.717Z] [Coverage] No quality gates have been set - skipping
      [2025-10-07T21:44:13.717Z] [Coverage] Executing source code painting...
      [2025-10-07T21:44:13.717Z] [Coverage] Painting 2401 source files on agent
      [2025-10-07T21:44:13.717Z] [Coverage] -> finished painting successfully
      [2025-10-07T21:44:13.717Z] [Coverage] -> zipping sources from folder '/home/jenkins/workspace/workspace/apps/coverage' as '/home/jenkins/workspace/workspace/apps/coverage-sources.zip'
      [2025-10-07T21:44:13.717Z] [Coverage] Copying painted sources from agent to build folder
      [2025-10-07T21:44:13.717Z] [Coverage] -> extracting...
      [2025-10-07T21:44:13.717Z] [Coverage] -> done
      [2025-10-07T21:44:13.717Z] [Coverage] Deleting source code files of build #1
      [2025-10-07T21:44:13.717Z] [Coverage] Finished coverage processing - adding the action to the build...// code placeholder
      

       

       

            drulli Ulli Hafner
            bgianfo Brian Gianforcaro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: