From: Andrea A. <and...@ge...> - 2011-04-30 13:18:16
|
Hi all, today I had a quick try at Sonar, a tool that computes and publishes software metrics aggregating results form tools such as Cobertura, PMD, FindBugs and the like. The tool is meant to be used in conjuction with a continout build system, but just to try it out I had it do a manual run on my local machine. If my machine and the sonar server are up you should see the results here: http://aaime.no-ip.org:9000 I've chosen the "Sonar way + findbugs" profile, which runs a lot of tests. As a result the analysis takes its dear time, 30 minutes on GeoTools for example, and provides a ton of results which contain a number of false positives and less than interesting information... nevertheless some is worth looking at. Curious to hear what you think about the tool and the results. If you want to see the results and the system is not up ping me on IRC or mail and I'll try to bring it back Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- |
From: <chr...@nv...> - 2011-04-30 13:55:32
|
Wow, I want this !!!!! Especially the hints for violations are useful. Really cool !. I take a deeper look at my imagemosaicJDBC module, interesting hints. +1 without further comment. Quoting Andrea Aime <and...@ge...>: > Hi all, > today I had a quick try at Sonar, a tool that computes and publishes > software metrics aggregating results form tools such as Cobertura, > PMD, FindBugs and the like. > > The tool is meant to be used in conjuction with a continout build > system, but just to try it out I had it do a manual run on my local machine. > If my machine and the sonar server are up you should see the results here: > http://aaime.no-ip.org:9000 > > I've chosen the "Sonar way + findbugs" profile, which runs a lot of tests. > As a result the analysis takes its dear time, 30 minutes on GeoTools for > example, and provides a ton of results which contain a number of > false positives and less than interesting information... nevertheless > some is worth looking at. > > Curious to hear what you think about the tool and the results. > If you want to see the results and the system is not up ping me > on IRC or mail and I'll try to bring it back > > Cheers > Andrea > > -- > ------------------------------------------------------- > Ing. Andrea Aime > GeoSolutions S.A.S. > Tech lead > > Via Poggio alle Viti 1187 > 55054 Massarosa (LU) > Italy > > phone: +39 0584 962313 > fax: +39 0584 962313 > > http://www.geo-solutions.it > http://geo-solutions.blogspot.com/ > http://www.youtube.com/user/GeoSolutionsIT > http://www.linkedin.com/in/andreaaime > http://twitter.com/geowolf > > ------------------------------------------------------- > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Joachim V. d. A. <jo...@ge...> - 2011-04-30 16:07:27
|
Cool. Did you do anything special to get this to run? I tried running it on our ci/sonar system a couple of weeks ago but failed. I am a big fan of sonar. Especially the violations drilddown gives a lot of interesting information. While there are undoubtably a lot of false positives, most of the checks are worthwhile verifying. You can often just use a comment (and sometimes an annotation) to tell sonar to ignore the violations at a certain place (using "// NOPMD" for the pmd checks, or in general "// NOSONAR"). Kind regards, Joachim On 04/30/2011 03:18 PM, Andrea Aime wrote: > Hi all, > today I had a quick try at Sonar, a tool that computes and publishes > software metrics aggregating results form tools such as Cobertura, > PMD, FindBugs and the like. > > The tool is meant to be used in conjuction with a continout build > system, but just to try it out I had it do a manual run on my local machine. > If my machine and the sonar server are up you should see the results here: > http://aaime.no-ip.org:9000 > > I've chosen the "Sonar way + findbugs" profile, which runs a lot of tests. > As a result the analysis takes its dear time, 30 minutes on GeoTools for > example, and provides a ton of results which contain a number of > false positives and less than interesting information... nevertheless > some is worth looking at. > > Curious to hear what you think about the tool and the results. > If you want to see the results and the system is not up ping me > on IRC or mail and I'll try to bring it back > > Cheers > Andrea > -- Joachim Van der Auwera Geosparc, supporting the Geomajas GIS community |
From: Andrea A. <and...@ge...> - 2011-04-30 16:24:43
|
On Sat, Apr 30, 2011 at 6:07 PM, Joachim Van der Auwera <jo...@ge...> wrote: > Cool. > > Did you do anything special to get this to run? I tried running it on > our ci/sonar system a couple of weeks ago but failed. This is running on my development machine, so I just made a manual maven run. This is more or less the recipe: - unpack sonar - create a sonar user with sonar password for the postgres db system - create a db named sonar with the sonar user - go into sonar/conf/sonar.properties and comment out the embedded db, uncomment/set these instead: sonar.jdbc.url: jdbc:postgresql://localhost/sonar sonar.jdbc.driverClassName: org.postgresql.Driver sonar.jdbc.validationQuery: select 1 sonar.jdbc.dialect=postgresql - sonar/bin/<your_os>/sonar.sh start - in $home/.m2/settings.xml add: <profiles> <profile> <id>sonar</id> <activation> <activeByDefault>false</activeByDefault> </activation> <properties> <sonar.jdbc.url>jdbc:postgresql://localhost/sonar</sonar.jdbc.url> <sonar.jdbc.username>sonar</sonar.jdbc.username> <sonar.jdbc.password>sonar</sonar.jdbc.password> <sonar.jdbc.driver>org.postgresql.Driver</sonar.jdbc.driver> </properties> </profile> </profiles> - following the user guide reccomendations at: http://docs.codehaus.org/display/SONAR/Analyse+with+Maven do in your project (for example, GeoTools): mvn clean install -Dtest=false -DfailIfNoTests=false -Dall mvn sonar:sonar -Dall -Psonar - wait a lot, when the build finishes you should have the project information available at http://localhost:9000 Last week I tried with the embedded db and it was a real pain, looking around they in fact say it's good only for demo purposes on small projects with a small sonar build history > I am a big fan of sonar. Especially the violations drilddown gives a lot > of interesting information. While there are undoubtably a lot of false > positives, most of the checks are worthwhile verifying. You can often > just use a comment (and sometimes an annotation) to tell sonar to ignore > the violations at a certain place (using "// NOPMD" for the pmd checks, > or in general "// NOSONAR"). Ah, this is good to know in fact. I have seen some egregious false positives around, _if_ someone pops up that can run the tool in a continous build enviroment and we have Sonar running continuosly I'll definitely make use of it. For the moment I want to keep it running for a while on my dev machine, long term, we'll see (afaik the opengeo build bot machine is already quite overloaded, might not be able to take on these very long builds) Cheers Andrea > > Kind regards, > Joachim > > On 04/30/2011 03:18 PM, Andrea Aime wrote: >> Hi all, >> today I had a quick try at Sonar, a tool that computes and publishes >> software metrics aggregating results form tools such as Cobertura, >> PMD, FindBugs and the like. >> >> The tool is meant to be used in conjuction with a continout build >> system, but just to try it out I had it do a manual run on my local machine. >> If my machine and the sonar server are up you should see the results here: >> http://aaime.no-ip.org:9000 >> >> I've chosen the "Sonar way + findbugs" profile, which runs a lot of tests. >> As a result the analysis takes its dear time, 30 minutes on GeoTools for >> example, and provides a ton of results which contain a number of >> false positives and less than interesting information... nevertheless >> some is worth looking at. >> >> Curious to hear what you think about the tool and the results. >> If you want to see the results and the system is not up ping me >> on IRC or mail and I'll try to bring it back >> >> Cheers >> Andrea >> > > > -- > Joachim Van der Auwera > Geosparc, supporting the Geomajas GIS community > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > > -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- |
From: Joachim V. d. A. <jo...@ge...> - 2011-04-30 19:18:49
|
On 04/30/2011 06:24 PM, Andrea Aime wrote: > On Sat, Apr 30, 2011 at 6:07 PM, Joachim Van der Auwera > <jo...@ge...> wrote: >> Cool. >> >> Did you do anything special to get this to run? I tried running it on >> our ci/sonar system a couple of weeks ago but failed. > This is running on my development machine, so I just made a manual > maven run. > This is more or less the recipe: > > - following the user guide reccomendations at: > http://docs.codehaus.org/display/SONAR/Analyse+with+Maven > do in your project (for example, GeoTools): > mvn clean install -Dtest=false -DfailIfNoTests=false -Dall > mvn sonar:sonar -Dall -Psonar > > - wait a lot, when the build finishes you should have the project information > available at http://localhost:9000 > > Last week I tried with the embedded db and it was a real pain, looking > around they in fact say it's good only for demo purposes on small projects > with a small sonar build history We have it running on postgres. Seem to work fine, though adding the sonar build step adds roughly 50% to the build times on our ci server. >> I am a big fan of sonar. Especially the violations drilddown gives a lot >> of interesting information. While there are undoubtably a lot of false >> positives, most of the checks are worthwhile verifying. You can often >> just use a comment (and sometimes an annotation) to tell sonar to ignore >> the violations at a certain place (using "// NOPMD" for the pmd checks, >> or in general "// NOSONAR"). > Ah, this is good to know in fact. I have seen some egregious false positives > around, _if_ someone pops up that can run the tool in a continous build > enviroment and we have Sonar running continuosly I'll definitely make use > of it. I was already trying to set it up on our CI system (Jenkins). It is failing though at the moment. I have to figure out what the problem is there. I will try to use the maven definitions you suggested. Hopefully that makes a difference. Once it works, there should be no problem to have that running daily. Kind regards, Joachim -- Joachim Van der Auwera Geosparc, supporting the Geomajas GIS community |
From: Justin D. <jde...@op...> - 2011-05-02 13:48:18
|
Cool stuff Andrea, I look forward to hearing more about your findings. Let me know what you think about integrating it into our primary hudson, or maybe using a secondary. As you say the build server is doing a lot already and it sounds like running the tests over the codebase is pretty resource intensive. But if it makes more sense to integrate into the main hudson we can maybe set something up. I guess it is designed to run on every commit like the regular build? Or something we can set up nightly? On Sat, Apr 30, 2011 at 1:18 PM, Joachim Van der Auwera < jo...@ge...> wrote: > On 04/30/2011 06:24 PM, Andrea Aime wrote: > > On Sat, Apr 30, 2011 at 6:07 PM, Joachim Van der Auwera > > <jo...@ge...> wrote: > >> Cool. > >> > >> Did you do anything special to get this to run? I tried running it on > >> our ci/sonar system a couple of weeks ago but failed. > > This is running on my development machine, so I just made a manual > > maven run. > > This is more or less the recipe: > > > > - following the user guide reccomendations at: > > http://docs.codehaus.org/display/SONAR/Analyse+with+Maven > > do in your project (for example, GeoTools): > > mvn clean install -Dtest=false -DfailIfNoTests=false -Dall > > mvn sonar:sonar -Dall -Psonar > > > > - wait a lot, when the build finishes you should have the project > information > > available at http://localhost:9000 > > > > Last week I tried with the embedded db and it was a real pain, looking > > around they in fact say it's good only for demo purposes on small > projects > > with a small sonar build history > We have it running on postgres. Seem to work fine, though adding the > sonar build step adds roughly 50% to the build times on our ci server. > > >> I am a big fan of sonar. Especially the violations drilddown gives a lot > >> of interesting information. While there are undoubtably a lot of false > >> positives, most of the checks are worthwhile verifying. You can often > >> just use a comment (and sometimes an annotation) to tell sonar to ignore > >> the violations at a certain place (using "// NOPMD" for the pmd checks, > >> or in general "// NOSONAR"). > > Ah, this is good to know in fact. I have seen some egregious false > positives > > around, _if_ someone pops up that can run the tool in a continous build > > enviroment and we have Sonar running continuosly I'll definitely make use > > of it. > I was already trying to set it up on our CI system (Jenkins). It is > failing though at the moment. I have to figure out what the problem is > there. I will try to use the maven definitions you suggested. Hopefully > that makes a difference. Once it works, there should be no problem to > have that running daily. > > Kind regards, > Joachim > > -- > Joachim Van der Auwera > Geosparc, supporting the Geomajas GIS community > > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. |
From: Andrea A. <and...@ge...> - 2011-05-02 14:21:52
|
On Mon, May 2, 2011 at 3:48 PM, Justin Deoliveira <jde...@op...> wrote: > Cool stuff Andrea, I look forward to hearing more about your findings. Well, it's not that I have much more to add. There is some good stuff in there, and it's cool to have some tool to "push" us to improve code quality. > Let me know what you think about integrating it into our primary hudson, or > maybe using a secondary. As you say the build server is doing a lot already > and it sounds like running the tests over the codebase is pretty resource > intensive. But if it makes more sense to integrate into the main hudson we > can maybe set something up. I guess it is designed to run on every commit > like the regular build? Or something we can set up nightly? It can be setup nightly no problem as far as I can see. Very much recommend to setup a postgres, and if you want to privilege performance over security you can disable fsynch in postgresql.conf: fsync = off # turns forced synchronization on or off Yes, it's not safe, don't ever do it in a production db, but I find the performance boost massive when it comes to running tests for the postgis store and I guess in this case too. It's not like we're going to pull out every other hair is we loose the Sonar build history (I guess?). Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- |