Hi.
If you don’t have a sonar task in the pipeline, a publication takes about 5 minutes.
It is normal if we put the tasks “Prepare analysis on SonarCloud”
and “Run Code Analysis” take 30 minutes?
Hi @Ola_Adeus and welcome to the community !
Depending on the size of code and the number of rules to be applied against it, we could have some performances going down.
First things first, do you have any limitation in terms of CPU / RAM in the machine that hosts the agent ?
Thanks.
Mickaël
Thanks Mickael
Are there additional properties templates for netcore projects?
As it exists for gitignore
hi @Ola_Adeus
to see what rules are taking time during build (see relevant topics on the community forum) when doing the build please add verbose and performance reporting
msbuild /p:reportanalyzer=true /v:d
We’re mostly interested in the time taken by each rule, you can find the specific logs by searching after “Time (s) % Analyzer” and see some log entries like below:
Total analyzer execution time: 893.913 seconds.
NOTE: Elapsed time may be less than analyzer execution time because analyzers can run concurrently.
Time (s) % Analyzer
893.913 100 SonarAnalyzer.CSharp, Version=7.13.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244
448.313 50 SonarAnalyzer.Rules.CSharp.TokenTypeAnalyzer
445.228 49 SonarAnalyzer.Rules.CSharp.SymbolReferenceAnalyzer
We’re interested in seeing all the time taken for the rules, for all your projects. Like this we can guide you to disable specific rules that take a lot of time, in case there are obvious outliers.
For which purpose ?