Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate continuous recording without time fixed #43

Open
sanorcdel opened this issue Apr 15, 2021 · 0 comments
Open

Generate continuous recording without time fixed #43

sanorcdel opened this issue Apr 15, 2021 · 0 comments

Comments

@sanorcdel
Copy link
Contributor

Currently, the startRecording handler method of the FlightRecorderEndpoint rest controller is validating if the input request contains the duration and timeUnit fields in the body.

I understand this is mandatory when the request represents the start of a time fixed recording. However, in case we want to start a continuous recording, these fields may not be needed. In fact, when the jfr file is imported in JMC, the Duration field value is 0 s in Event Browser view if the original request contains maxSize or maxAgeDuration fields.

I think it could be nice if the startRecording handler method will validate the request but in another way. Checking if the request contains the duration and timeUnit fields in case maxSize or maxAgeDuration (and maxAgeUnit) do not appear.

On this way, three possible scenarios will be available:

  1. Time fixed recording -> Input request contains the duration but not the maxAgeDuration or maxSize fields
  2. Continuous + Time fixed recording -> Input request contains the duration and the maxAgeDuration and/or maxSize fields
  3. [new] Continuous recording -> Input request does not contain the duration but the maxAgeDuration and/or maxSize fields must appear. These recordings must be stopped manually using the API.

What do you think? I can submit a Pull Request so you can have a look to my implementation. The idea of this change is have a similar behavior of Java Mission Control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant