when is the execution data sent to tcp server of jacoco agent with output in tcpclient mode

299 views
Skip to first unread message

tracy...@gmail.com

unread,
Mar 16, 2018, 6:29:07 AM3/16/18
to JaCoCo and EclEmma Users
Since we are using auto-scaling, we don't know how many app servers with jacoco agent would be started at the beginning.So we need to run jacoco agent with output in tcpclient mode. We started a tcp server(implemented via java) in advance, and jacoco agents can connect to it. The question is when the execution data would be dumped to the tcp server?
It seems by default the execution data would be dumped when the app server shutdown. Is there any mechanism that the server can dump the execution data from all jacoco agents on demand? Or can I dump execution data via jacoco-maven-plugin on demand?

Evgeny Mandrikov

unread,
Mar 19, 2018, 6:36:39 PM3/19/18
to JaCoCo and EclEmma Users


On Friday, March 16, 2018 at 11:29:07 AM UTC+1, tracy...@gmail.com wrote:
Since we are using auto-scaling, we don't know how many app servers with jacoco agent would be started at the beginning.So we need to run jacoco agent with output in tcpclient mode. We started a tcp server(implemented via java) in advance, and jacoco agents can connect to it. The question is when the execution data would be dumped to the tcp server?
It seems by default the execution data would be dumped when the app server shutdown.
 
Yes - by default in all modes (file, tcpserver and tcpclient) data is written during shutdown of agent.
 
Is there any mechanism that the server can dump the execution data from all jacoco agents on demand?
 
In both tcpserver and tcpclient modes dump can be requested before shutdown - the protocol is the same for both, the only difference is how the connection is established.
And here is reference to same/similar question asked before - https://groups.google.com/d/msg/jacoco/V7Bmz5r0P24/PdCC5apIoqgJ
 
Or can I dump execution data via jacoco-maven-plugin on demand?

From documentation at http://www.jacoco.org/jacoco/trunk/doc/dump-mojo.html : Request a dump over TCP/IP from a JaCoCo agent running in tcpserver mode.

Reply all
Reply to author
Forward
Message has been deleted
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages