Turn off jacoco agent after runtime

41 views
Skip to first unread message

thaton...@gmail.com

unread,
May 12, 2016, 5:48:05 PM5/12/16
to JaCoCo and EclEmma Users
I am trying to run the jacoco agent on production servers. To get coverage statistics from users. This helps us get an accurate target for coverage of manual/unit/integration tests. I know this sounds really dumb but it is something I would like to do. Currently we can run in our dev and qa environments because they don't see very much load. We cannot however run in production because we see an enormous amount of gc cycles. we had to more than double our server count to keep it up and running.

So the question is: is there a possibility of turning off the operations of the jacoco agent during runtime? Essentially this would let us run the jacoco agent on all servers but be able to turn on or off the collection (potentially removing performance issues). Or is the way it instruments it something that happens at boot and can't just be undone.

Marc R. Hoffmann

unread,
May 13, 2016, 8:52:41 AM5/13/16
to jac...@googlegroups.com
Hi,

regarding your question: The jacoco agent instruments classes when
loaded the first time. "Uninstrumentation" ist not supported.

> We cannot however run in production because we see an enormous amount
of gc cycles. we had to more than double our server count to keep it up
and running.

That is an interesting observation. JaCoCo should not allocate any
object instances after the classes have been instrumented. May I ask you
to have a closer look what allocations are causing these additional gc
cycles? For example with the "agentlib:hprof=heap=sites" option:

http://docs.oracle.com/javase/7/docs/technotes/samples/hprof.html

Best regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages