Ah, I see. That explains the file size. Ok, thanks a lot for the clarification.
On Thursday, April 17, 2014 2:21:22 AM UTC+10, Marc R. Hoffmann wrote: > Hi, > > > > there is a subtile difference: In the scenario you describe you will > > still retrieve execution data, but the data says that your method has > > not been executed. > > > > It is not possible to actually not retrieve execution data for methods > > that have not been executed. You always get execution data for all > > classes which has been loaded into the JVM. > > > > Cheers, > > -marc > > > > > > On 2014-04-16 10:43, Spike wrote: > > > Thanks Marc. I understand how the append attribute works but the reset > > > doesn't seem to tally with what I see. > > > > > > Just to make sure I understand, suppose there are execution data at > > > the target JVM for the execution of MyClass.MyMethod. If I then do a > > > dump with reset=true and retrieve these execution records and, > > > assuming MyClass.MyMethod has not executed again, if I do another dump > > > then there will be no execution data retrieved for MyClass.MyMethod. > > > > > > Is that correct? > > > > > > What I would like to achieve is to retrieve execution data > > > periodically and append it to a file. In doing this, I don't want to > > > retrieve execution data that I've already retrieved. > > > > > > Thanks. > > > > > > On Wednesday, April 16, 2014 5:16:04 PM UTC+10, Marc R. Hoffmann wrote: > > >> Hi, > > >> > > >> > > >> > > >> the 'reset' attribute controls whether execution data in the target > > >> JVM > > >> > > >> is reset, i.e. all classes are marked as not executed after the dump. > > >> > > >> The reset attribute has no influence on the written exec file. > > >> > > >> > > >> > > >> There is another attribute 'append' which controls whether the > > >> retrieves > > >> > > >> data is appended to an existing exec file or the exec file is > > >> > > >> overwritten. > > >> > > >> > > >> > > >> Please see documentatioon for details: > > >> > > >> http://www.eclemma.org/jacoco/trunk/doc/ant.html#dump > > >> > > >> > > >> > > >> Best regards, > > >> > > >> -marc > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> On 2014-04-16 08:16, Spike wrote: > > >> > > >> > I have the following java agent options: > > >> > > >> > > > >> > > >> > -javaagent:C:/JaCoCo/lib/jacocoagent.jar=output=tcpserver > > >> > > >> > > > >> > > >> > I have the following ant task: > > >> > > >> > > > >> > > >> > <jacoco:dump reset="true" destfile="jacoco.exec"/> > > >> > > >> > > > >> > > >> > I run the dump task and a jacoco.exec file is created and I can then > > >> > > >> > generate a report. > > >> > > >> > > > >> > > >> > If I run the dump task again, the jacoco.exec file doubles in size. > > >> > > >> > > > >> > > >> > If I run the dump task a third time, the jacoco.exec file trebles in > > >> > > >> > size. > > >> > > >> > > > >> > > >> > I realize the jacoco.exec file is being appended to, but I'm not sure > > >> > > >> > if there is a duplication of execution data. > > >> > > >> > > > >> > > >> > If I change the reset to false, I get exactly the same behaviour with > > >> > > >> > the file size. > > >> > > >> > > > >> > > >> > <jacoco:dump reset="false" destfile="jacoco.exec"/> > > >> > > >> > > > >> > > >> > Could someone confirm that the reset="true" clears all execution data > > >> > > >> > after dumping and that this same execution data isn't returned on a > > >> > > >> > subsequent dump? > > >> > > >> > > > >> > > >> > If that's not the case, what does reset do? > > >> > > >> > > > >> > > >> > How do I get the java agent to clear the execution data? > > >> > > >> > > > >> > > >> > Thanks. -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
