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

Update profiling CLI arguments #3461

Merged
merged 16 commits into from
May 24, 2022
Merged

Update profiling CLI arguments #3461

merged 16 commits into from
May 24, 2022

Conversation

4e6
Copy link
Contributor

@4e6 4e6 commented May 18, 2022

Pull Request Description

PR adds/updates CLI flags:

  • --profiling-events-log-path <file> enable the event logging with ability to specify the file to store the messages between the runtime and the language server
  • --profiling-path <file> enable the application profiling with ability to specify the file to store the .npss sampling statistics
  • --profiling-time <seconds> limits the application profiling time. If not specified, the profiling is stopped on the application shutdown

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the Scala, Java, and Rust style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH ./run dist and ./run watch.

@4e6 4e6 requested a review from JaroslavTulach as a code owner May 18, 2022 13:33
@4e6 4e6 self-assigned this May 18, 2022
@JaroslavTulach
Copy link
Member

One more request. The IDE logs events it sends to the language server engine runtime. Can we make sure the same events, with the same IDs and similar timestamps are in the generated .log file? We need this to pair the two logs - having additional events in the log isn't necessary - in fact too many events may complicate orientation on the timeline.

@4e6 4e6 requested a review from JaroslavTulach May 23, 2022 12:09
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this in and let's see how well it works!


case Some(serverContext) =>
for {
_ <- stopSampling(serverContext)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this looks like fine order of actions. Stopping sampling before terminating Truffle.

@4e6
Copy link
Contributor Author

4e6 commented May 24, 2022

Can we make sure the same events, with the same IDs and similar timestamps are in the generated .log file?

The logging goes through the central logging service. I updated the logic, and not it also produces the profiling log when the profiling is enabled. This way the log captures all the messages as the previous solution with the Java log handler was only able to capture logs from within the runtime.

@4e6 4e6 added the CI: Ready to merge This PR is eligible for automatic merge label May 24, 2022
@4e6 4e6 merged commit f9d2964 into develop May 24, 2022
@4e6 4e6 deleted the wip/db/profiling-flags branch May 24, 2022 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants