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

On-deman backend heap and thread dump #8320

Merged
merged 4 commits into from
Nov 20, 2023

Conversation

4e6
Copy link
Contributor

@4e6 4e6 commented Nov 17, 2023

Pull Request Description

close #8249

Changelog:

  • add: profiling/snapshot request that takes a heap dump of the language server and puts it in the ENSO_DATA_DIRECTORY/profiling direcotry

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@4e6 4e6 added the CI: No changelog needed Do not require a changelog entry for this PR. label Nov 17, 2023
@4e6 4e6 self-assigned this Nov 17, 2023
@@ -14,4 +14,10 @@ object ProfilingProtocol {
/** A response to request to stop the profiling. */
case object ProfilingStopResponse

/** A request to create a memory snapshot. */
case object ProfilingSnapshotRequest
Copy link
Member

Choose a reason for hiding this comment

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

Is it really profiling? Isn't it memory dump or "telemetry snapshot"?

@4e6 4e6 added the CI: Ready to merge This PR is eligible for automatic merge label Nov 19, 2023
@Test
public void generateHeapDump() throws IOException {
String heapDumpFileName =
getClass().getSimpleName() + "-" + System.currentTimeMillis() + ".hprof";
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be easier to locate if this has a human-readable time format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is supposed to be removed after the test anyway. The actual heap dump file created by the language server will be in a human-readable format.

@mergify mergify bot merged commit b224f95 into develop Nov 20, 2023
30 of 33 checks passed
@mergify mergify bot deleted the wip/db/8249-on-deman-backend-heap-and-thread-dump branch November 20, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On-deman backend heap and thread dump
3 participants