Re: [Codenarc-developer] AstUtils rewrite - can you test against Grails?
Brought to you by:
chrismair
From: Hamlet D. <ham...@ca...> - 2011-09-19 12:40:27
|
The RunCodeNarcAgainstCodeNarc test is really useful, because I can make my changes and then run YourKit through IDEA for performance benchmarks. It's slick because YourKit allows you to jump back and forth between IDE and the benchmarks. All we'd need to do is clone that test, point it at the Grails source on disk (which we both have), share your codenarc.properties file, and then run it as a unit test. Seems simple, and a more real-world benchmark, even if we alos set the test to @Ignore or comment it out. I wouldn't bother pointing CodeNarc at an SVN repo, unless it were integrated into the CodeNarc web console. But then, it's not a useful tool so much as a gateway to demonstrate the power of CodeNarc. I think our efforts are still better suited towards expanding the ruleset. By the way, the GMetrics rules are the biggest bottleneck right now. I'm estimating a 15% or higher performance improvement if we rewrite the GMetrics AstUtils. The other feature I'd really like is a CodeNarc properties visual editor. You could run it from the command line or through the Grails plugin. It could pop open a Swing UI that looks like the IDEA inspections UI. That would be a nice way to edit rule. But I'd want the feature to use only core JDK/Groovy classes so we don't introduce extra dependencies. -- Hamlet ----- Original Message ----- > Hamlet, > > I will rebuild and run against Grails+Gradle again. > > In my current setup, I build a CodeNarc jar (mvn package) and copy > that jar to a separate directory where I already have the other jars > (GMetrics and Log4J) and a bat file to execute it. I point it at a > locally-installed instance of the Grails source (and also Gradle > source). This was not really (originally) intended as a performance > benchmark, but more as a way to generate the sample reports and also > be a regression test at the same time. > > Running CodeNarc against a Git or SVN repo, or against a jar/zip file > for that matter, are still only potential future features. Does > automating any of the above make sense as a unit test? > > Chris > -----Original Message----- > From: Hamlet D'Arcy [mailto:ham...@gm...] > Sent: Monday, September 19, 2011 7:11 AM > To: Cod...@li... > Subject: [Codenarc-developer] AstUtils rewrite - can you test against > Grails? > > Hi Chris, > > I finally got my merge issues resolved and checked in. > > I rewrite AstUtil.groovy to be AstUtil.java. It gave me less > performance improvements than I expected on my test run. I am seeing > about 4% improvement total, which is not very much, IMO. > > Can you try running the latest against Grails? How are you doing > that? > I propose that we add a unit test to the > RunCodeNarcAgainstCodeNarcTest that runs the code against the Grails > source. We can comment out the test so it never runs with the build, > but then at least we share the same benchmark? My current benchmark > is > just running CodeNarc against CodeNarc. What do you think? > > > -- > Hamlet D'Arcy > ham...@gm... > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon > today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon > today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > |