jacoco / jacoco/jacoco

Clarify semantics of RemoteControlWriter.read() in JavaDoc

Open
#1,937 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: documentation type: enhancement
Dominant language
Java
Stars
4.6k
Forks
1.2k
Avg merge
1d 9h
Merged PRs (30d)
23

Description

Scenario
  • JaCoCo version: 0.8.13
  • Operating system: Linux
  • Tool integration Agent
  • Description of your use case:
    Hey,
    I'm building a service that jacoco agents in output=tcpclient can connect to.
    Within that service I have a functionality to send a dump request to an agent using
RemoteControlWriter remoteControlWriter =
        new RemoteControlWriter(handler.getSocket().getOutputStream());
remoteControlWriter.visitDumpCommand(true, true);

And the read side is also as follows:

new RemoteControlWriter(socket.getOutputStream());
reader = new RemoteControlReader(socket.getInputStream());
reader.setSessionInfoVisitor(this);
reader.setExecutionDataVisitor(this);

while (reader.read()) {}
socket.close();

Pretty standard stuff :)

However my functionality requires that the dump data be saved to s3, and I have no way to know when all data has been sent

Current Behaviour

On the read side the ISessionInfoVisitor, IExecutionDataVisitor are called as expected however there is currently no way to to know when all execution data has been sent.

Wanted Behaviour

A new command and visitor interface that the client sends when all execution data has been sent to the server.

That way we can know when all data has been sent (and received) by the server and we can act upon it.

Possible Workarounds

Not that I know of :(

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the RemoteControlWriter and RemoteControlReader usage shown in the issue, including the read() loop and the ISessionInfoVisitor and IExecutionDataVisitor callbacks. Determine how the remote-control exchange signals completion and what the proposed command and visitor contract should guarantee. Done means the semantics are documented and the completion behavior is specified consistently for both sides.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.