Our Grails Stats: but what are yours?

We’re currently working on a Grails project for over a year now, with, on average, around 8 people including testers. I thought it would be nice to share our project statistics, but I’m wondering how our statistics compare to yours.

Some information about our project:

  • Java Helpers: this is 100% generated (CXF/JAXB code).
  • Scripts: this consists of some scripts to set the build number, generate the above CXF code based on some WSDLs, and run our Javascript unit tests
  • Domain/Service: Most of our business logic is in the domain or service layer. There is still to much code in our controllers, and we are working on that to make our controller layer smaller.

I hacked the script to also display our GSP and Javascript files. The Javascript is not entirely accurate, since it also includes JQuery and some JQuery libraries. Our functional (Geb) tests are missing though. These are quite new in our application, but are taking a bigger and bigger portion of our tests.

So, I’m curious to see what your project statistics looks like. If you run:

grails stats

You’ll get the same format as above. Please post it as a comment, even if it’s only a small project, along with some project details you might find interesting to share, and let’s see if we can create some nice graphs out of this!!

9 replies
  1. Tomas
    Tomas says:

    I found that grails stats only works with your top level project, so if you actually use the recommended plugin-oriented architecture, you need to run grails stats on each plugin / level.

  2. Martijn
    Martijn says:

    Can you share the scripts for generating the above (including the Javascript/GSP files)? Then I’ll run it along some of our projects as well

    • Erik Pragt
      Erik Pragt says:

      Hi Martijn, thanks for the reply!

      What I did was that I changed the ‘Stats’ scripts in the scripts directory, and I added these two lines:

      [name: “GSP”, path: “views”, filetype: [“.gsp”]],
      [name: “Javascript”, path: “js”, filetype: [“.js”]],

  3. Demian
    Demian says:

    Just running Grails Stats

    • Erik Pragt
      Erik Pragt says:

      Hi Demian,

      Thanks for posting your stats! Interesting to see how much integration tests you have! Is there a specific reason for choosing Integration above Unit tests?

  4. Ted Naleid
    Ted Naleid says:

    This is from a project that’s about 18 months old, started with just me and has grown to 8 devs over that period:

    Looks like our projects are very similar in size. My output doesn’t show gsp and javascript (how did you get that?), but I’d guess we’ve got about the same ratio as you do.

    • Erik Pragt
      Erik Pragt says:

      Hi Ted, thanks for posting your result! Interesting, and your project seems very similar to ours indeed!

      To get the js and gsp output, I hacked the Grails Stats script a bit by adding the following two lines:
      [name: “GSP”, path: “views”, filetype: [“.gsp”]],
      [name: “Javascript”, path: “js”, filetype: [“.js”]],

      It’s not very accurate since it includes our JQuery libraries, but a nice indication maybe.

Trackbacks & Pingbacks

Comments are closed.