Hi, please see API of class RuntimeData. You can either ask to reset probes during collecting data:
https://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/core/runtime/RuntimeData.html#collect(org.jacoco.core.data.IExecutionDataVisitor,%20org.jacoco.core.data.ISessionInfoVisitor,%20boolean) <https://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/core/runtime/RuntimeData.html#collect(org.jacoco.core.data.IExecutionDataVisitor, org.jacoco.core.data.ISessionInfoVisitor, boolean)> or you can reset probes at any point in time: https://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/core/runtime/RuntimeData.html#reset() <https://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/core/runtime/RuntimeData.html#reset()> Regards, -marc > On 5. Sep 2023, at 12:27, 赵无敌 <[email protected]> wrote: > > Good day! > From this doc, I've realized how to Instrument and collect coverage > data. > https:www.jacoco.org/jacoco/trunk/doc/examples/java/CoreTutorial.java > And I can get the coverage data by my code (I integrate jacoco's > Instrumenter in my java-agent), but is there a way to clear / reset the > data to initialization state at a custom point in time ? and after then, > the data continue to be collected as usual > Thx! > > -- > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/db353071-2339-435a-a038-04c9ab5329aen%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/db353071-2339-435a-a038-04c9ab5329aen%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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/B0B21CBF-BB37-4E8C-93D0-D233B615953A%40mountainminds.com.
