Hi,

Specifically, how does Jacoco record coverage information and in what manner is this information organized?

JaCoCo records coverage by instrumenting the classes and inserting probes. How probes are inserted and how coverage information is derived from it is described here:

  http://www.jacoco.org/jacoco/trunk/doc/flow.html

Is this data stored on disk and is it permanent so that I can access it after the runtime exits?

By default the JaCoCo agent stores it as a "exec" file on disk.

For instance, does Jacoco write to a log that is on-disk when recording changes in coverage as a program is running?

Probe execution data is only written when the JVM terminates (or on user request).

is there a data structure that's being represented on a file on disk that maps from each method to its branch coverage information?

Not in the exec file. Exec files basically contain a boolean array of probe execution status. All coverage counters (including branch coverage) are calculated at analysis time using the strategy described in the link above.

Regards,
-marc


On 2018-02-27 05:47, [email protected] wrote:
Hi, I am currently using Jacoco to measure branch coverage and would
like to understand a couple implementation details that aren't
addressed at
http://www.jacoco.org/jacoco/trunk/doc/implementation.html.

Specifically, how does Jacoco record coverage information and in what
manner is this information organized? Is this data stored on disk and
is it permanent so that I can access it after the runtime exits?

For instance, does Jacoco write to a log that is on-disk when
recording changes in coverage as a program is running? If there is a
log, is this log sequential in that it records accesses to branches.
Or alternatively, is there a data structure that's being represented
on a file on disk that maps from each method to its branch coverage
information? Or finally, is all "logging" done with data structures in
memory?

If there are resources addressing these topics, I would be interested
in them as well. Thank you!

--
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d53c261e4ac089219e7fe6294fe96e73%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to