Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1264

Performance problem with SHARED coverage recorder in Grails app

      Follow up of CLOV-1189.

          setuptask = { ant, binding, plugin ->
              ant.'clover-setup'(initstring: ".clover/common.db") {
                  ant.fileset(dir: "grails-app", includes: "**/domain/**, **/controllers/**, **/jobs/**, **/services/**, **/taglib/**, **/utils/**") { }
                  ant.fileset(dir: "src", includes: "**/*.groovy, **/*.java", excludes: "**/script@*.groovy, **/system/generator/**, **/system/database/generators/**, **/castor/**") { }
                  ant.fileset(dir: "test", includes: "**/*.groovy") { }
                  // ant.testsources(dir: "test", enabled: false) { }
                  ant.profiles {
                      ant.profile(name: "default", coverageRecorder: "SHARED")
                  }
              }
          }
      

      If I uncomment the testsources enabled:false line, it runs about as quickly as before. Normally our coverage run takes about 42 minutes. With the above configuration it's been running for about 3 hours and is about half finished.

        1. clover-3.1.12-SNAPSHOT.z01
          8.00 MB
        2. clover-3.1.12-SNAPSHOT.zip
          3.77 MB
        3. clover-3.1.12-SNAPSHOT-V2.z01
          6.50 MB
        4. clover-3.1.12-SNAPSHOT-V2.zip
          5.27 MB
        5. grails-clover-3.1.11.1.zip
          11 kB

            [CLOV-1264] Performance problem with SHARED coverage recorder in Grails app

            Hi Aaron, did you have a chance to check my fixes? Cheers!

            Marek Parfianowicz added a comment - Hi Aaron, did you have a chance to check my fixes? Cheers!

            I have prepared a version which works with parallel tests as well (SNAPSHOT-V2.zip). Performance should be similar.

            It would be great if you could check both versions and let me know how much time takes the test execution.

            Cheers
            Marek

            Marek Parfianowicz added a comment - I have prepared a version which works with parallel tests as well (SNAPSHOT-V2.zip). Performance should be similar. It would be great if you could check both versions and let me know how much time takes the test execution. Cheers Marek

            Aaron Long added a comment -

            I'm on vacation this week for Spring Break, but I'll test it as soon as I get back in the office next week. Thanks again for the quick turnaround. Also, I have a small test suite that I can run with and without the Shared recorder in YourKit to show the difference in timings and where the extra time is spent. If this optimization doesn't help, I'll collect that data and attach to this ticket.

            Aaron Long added a comment - I'm on vacation this week for Spring Break, but I'll test it as soon as I get back in the office next week. Thanks again for the quick turnaround. Also, I have a small test suite that I can run with and without the Shared recorder in YourKit to show the difference in timings and where the extra time is spent. If this optimization doesn't help, I'll collect that data and attach to this ticket.

            Hi Aaron,

            I've made one optimization which I believe should improve the performance. The limitation is that it might not be accurate for tests executed in parallel. But for sequential run (as grails does) should be OK. Could you test your project using the attached development build?

            Regards
            Marek

            Marek Parfianowicz added a comment - Hi Aaron, I've made one optimization which I believe should improve the performance. The limitation is that it might not be accurate for tests executed in parallel. But for sequential run (as grails does) should be OK. Could you test your project using the attached development build? Regards Marek

              mparfianowicz Marek Parfianowicz
              mparfianowicz Marek Parfianowicz
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: