> I believe the exec files are so large because they have duplicate
coverage data, and the merge removes all that duplication. Is that correct?
This is correct. When you dump the the execution data regularly your
code simply appends the data for all classes again and again. If you
merge this data gets combined again.
You can re-write your code to first read the existing exec file, then
dump the data in-memory and *replace* the exec file with the new
content. In this case the total size of your exec file is limited to the
total number of classes you have deployed.
Cheers,
-marc
On 02.01.14 05:31, donny choo wrote:
Marc,
thanks for the information on this. glad to see I did it correct! :-)
It seems that these files can get very large. Lets say that I'm
appended every half hour to the same file and I get a new file
everyday. At the end of the day my files are pushing 10 megs.
Now, I pull the files off the server and merge them with the ant task.
The resulting file is 600k!
I'd really like to keep the files as small as possible on the server.
Should I use ExecFileLoader and merge them like the ant task does, or
is there some better way to "compact" the file like merge does?
I believe the exec files are so large because they have duplicate
coverage data, and the merge removes all that duplication. Is that
correct?
On Friday, November 15, 2013 1:39:25 PM UTC-6, Marc R. Hoffmann wrote:
Hi,
perfect, this is exactly the purpose of the execution data API.
Cheers,
-marc
On 15.11.13 17:41, donny choo wrote:
> Hi,
>
> I to run my app with JaCoCo and have it dump its own coverage data.
> After some fiddling it appears that this code via a scheduled
> executor works:
>
> final OutputStream out = new FileOutputStream(new
> File("/tmp/foo"), true);
> try{
>
out.write(org.jacoco.agent.rt.RT.getAgent().getExecutionData(true));
> } catch (Throwable t) {
> log.error(t,t);
> }
> finally {
> out.close();
> }
>
>
> Are there any concerns about doing this? Am I using the correct
API?
>
> 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] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>.
--
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/groups/opt_out.
--
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/groups/opt_out.