# Execution time mismatch

**URL:** <https://community.sonarsource.com/t/execution-time-mismatch/132820>\
**Category:** SonarQube Server / Community Build\
**Tags:** jenkins, sonarqube, java\
**Created:** [December 31, 2024, 11:01am UTC](https://community.sonarsource.com/t/execution-time-mismatch/132820 "2024-12-31T11:01:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![morayke](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@morayke](https://community.sonarsource.com/u/morayke)\
**Post date:** [December 31, 2024, 11:01am UTC](https://community.sonarsource.com/t/execution-time-mismatch/132820/1 "2024-12-31T11:01:09Z")

</div>

Hello,

I have integrated the execution of SonarQube analysis in Jenkins. I have a pipeline script that executes a gradle command to launch the sonar analysis.

For this I use this gradle plugin → org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373

Everything works fine but the analysis takes a long time

```auto
11:45:46 D:\Jenkins\workspace\orkspace_environment_test_fedris>D:\gradle\gradle-6.9.4/bin/gradle sonarqube -Dsonar.login=sqa_be1f33d639bc4a0ff054aeab2ca932fd4ff296c1 -Dsonar.host.url=http://w2019-sonarqube.fedris.be:9000 -Dsonar.qualitygate.wait=true -Dsonar.gradle.skipCompile=true
...
11:50:41 BUILD SUCCESSFUL in 4m 45s

```

When I look at the SonarQube level, I have totally different time.

Submitted : 11.49:30 AM  
Started : 11:49:30 AM  
Finished : 11:50:29 AM  
Duration : 58s

Does anyone have an explanation for this? What should I do to reduce the analysis time?

Thanks

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [January 2, 2025, 10:33am UTC](https://community.sonarsource.com/t/execution-time-mismatch/132820/2 "2025-01-02T10:33:00Z")

</div>

Hey there.

SonarQube analysis has two phases: the scanner runs in a local developer or CI/CD environment, and then the report is set to SonarQube for [processing](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/background-tasks/).

So it would seem that your analysis (scanner-side) started sometime after 11:45:46, submitted the analysis report around 11:49:30, and finished up processing at 11:50:29. Based on your scanner command, your build is [waiting](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/ci-integration/overview/#quality-gate-fails) for the report to be processed, or you just have some other stuff going on in your build that takes up the time until 11:50:29.

> [@morayke](#):
>
> Everything works fine but the analysis takes a long time

Everything’s relative. How big is your project (Lines of Code or modules is a good measure)? How long does a build (without SonarQube analysis) take? What version of SonarQube are you using (this info can be found in the footer of your instance)?
