Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache coverage data #822

Merged
merged 1 commit into from
Apr 10, 2016
Merged

Conversation

jmecosta
Copy link
Member

@guwirth do you know a way to get this cache thing working. caches for each module are always empty

@guwirth
Copy link
Collaborator

guwirth commented Apr 1, 2016

do you know a way to get this cache thing working. caches for each module are always empty

Hi @jmecosta no idea. What exactly should this PR do/improve?

@jmecosta
Copy link
Member Author

jmecosta commented Apr 1, 2016

in multiple modules configurations, for example when using the msbuild sonar runner if you have a solution with multiple projects then the parser will parse every report again and again, we have 100 MB reports and solutions with 60-70 projects. so the benifict in this case will be good. ive follow the same approach as here, https://github.com/SonarSource/sonar-dotnet-tests-library/pull/19

@guwirth
Copy link
Collaborator

guwirth commented Apr 1, 2016

Gotcha. Is it ready to merge from your side?

Am 01.04.2016 um 17:52 schrieb Jorge Costa [email protected]:

in multiple modules configurations, for example when using the msbuild sonar runner if you have a solution with multiple projects then the parser will parse every report again and again, we have 100 MB reports and solutions with 60-70 projects. so the benifict in this case will be good. ive follow the same approach as here, SonarSource/sonar-dotnet-tests-library#19


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@jmecosta
Copy link
Member Author

jmecosta commented Apr 1, 2016

Nop it does not work :)

On Fri, 1 Apr 2016 19:53 Günter Wirth, [email protected] wrote:

Gotcha. Is it ready to merge from your side?

Am 01.04.2016 um 17:52 schrieb Jorge Costa [email protected]:

in multiple modules configurations, for example when using the msbuild
sonar runner if you have a solution with multiple projects then the parser
will parse every report again and again, we have 100 MB reports and
solutions with 60-70 projects. so the benifict in this case will be good.
ive follow the same approach as here,
SonarSource/sonar-dotnet-tests-library#19


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#822 (comment)

@jmecosta
Copy link
Member Author

jmecosta commented Apr 1, 2016

But anyway leave it open I try to figure out how it's donw when I have a
bit of time

On Fri, 1 Apr 2016 20:25 Jorge Costa, [email protected] wrote:

Nop it does not work :)

On Fri, 1 Apr 2016 19:53 Günter Wirth, [email protected] wrote:

Gotcha. Is it ready to merge from your side?

Am 01.04.2016 um 17:52 schrieb Jorge Costa [email protected]:

in multiple modules configurations, for example when using the msbuild
sonar runner if you have a solution with multiple projects then the parser
will parse every report again and again, we have 100 MB reports and
solutions with 60-70 projects. so the benifict in this case will be good.
ive follow the same approach as here,
SonarSource/sonar-dotnet-tests-library#19


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#822 (comment)

@guwirth
Copy link
Collaborator

guwirth commented Apr 2, 2016

you know a way to get this cache thing working

I guess it's a path issue. Different baseDir or slash/backslash ...

@jmecosta jmecosta force-pushed the cache-coverage-data branch 2 times, most recently from 3bcdaf3 to 3ce3529 Compare April 9, 2016 15:03
@jmecosta
Copy link
Member Author

jmecosta commented Apr 9, 2016

@BobSilent notice that you have proposed a similar thing to the .net side. have you tested the solution implemented there? i have tested it and i get some behaviour has this one, the batchextension gets instantiated for each module, rather than only once for all modules.

@jmecosta
Copy link
Member Author

jmecosta commented Apr 9, 2016

nevermind, its working now. @guwirth ready for review. next to have cache are reports and build log parser

@guwirth guwirth added this to the 0.9.6 milestone Apr 9, 2016
@guwirth
Copy link
Collaborator

guwirth commented Apr 9, 2016

@jmecosta code looks good but also failing with SQ 5.5-RC1. Start of SQ not possible.

@guwirth
Copy link
Collaborator

guwirth commented Apr 9, 2016

@jmecosta SQ 5.5-RC1 is another problem.
👍

@guwirth
Copy link
Collaborator

guwirth commented Apr 9, 2016

@jmecosta merge conflicts. Please rebase and try again.

@jmecosta
Copy link
Member Author

@guwirth rebase and squashed. ready to go

@jmecosta
Copy link
Member Author

@guwirth whats the issue with 5.5, i try with a local installation and it also fails with this:

2016.04.09 15:44:18 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
org.sonar.api.utils.MessageException: The rule 'rats:drand48' is invalid : Linear functions must only have a non empty gap multiplier
2016.04.09 15:44:18 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.04.09 15:44:18 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors

@guwirth guwirth merged commit bba25d2 into SonarOpenCommunity:master Apr 10, 2016
@BobSilent
Copy link
Contributor

@jmecosta i proposed a very simple solution there by caching the information for which coverage file the information was already loaded. With caching the information in a static way.
Now the solution is to merge the coverage data into a large coverage information.

If you would have asked me, i would not have reimplemented it here in cxx, as you already have the dotnet library dependency I would have reused the coverage importer from there, by just adding an adapted CxxSensor and CxxParser entrypoint here and using maybe have a dedicated implemention for the bullseye and cobertura parsers here in cxx.
This would also enable cxx for ncover, dotcover and opencover as well (which is implemented in sonar-dotnet-tests-library already)

@jmecosta
Copy link
Member Author

@BobSilent thanks, i am ensure how much should we depend on the dot test test library since its mostly for manage side. anyway the implementation that ive done its simpler than in the tests library, so it just saves each report coverage(it does not merge). also we need to do some caching on the issues report and buildlog parsing so it was a good exercise to see how to put it together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants