Skip to content

profile: Add heap snapshot profiling support#355

Merged
aviatesk merged 1 commit intomasterfrom
avi/memory-footprint
Dec 3, 2025
Merged

profile: Add heap snapshot profiling support#355
aviatesk merged 1 commit intomasterfrom
avi/memory-footprint

Conversation

@aviatesk
Copy link
Copy Markdown
Owner

@aviatesk aviatesk commented Dec 3, 2025

Add a mechanism for capturing heap snapshots of the JETLS server process to analyze memory footprint and detect potential memory leaks.

Creating a .JETLSProfile file in the workspace root triggers a heap snapshot. The server saves it as JETLS_YYYYMMDD_HHMMSS.heapsnapshot, shows a notification, and automatically deletes the trigger file via LSP workspace/applyEdit.

The implementation uses Profile.take_heap_snapshot with streaming mode and includes progress indicator support. The generated snapshots can be analyzed using Chrome DevTools.

Written with Claude

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 9.67742% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.82%. Comparing base (5c3da1b) to head (b93070a).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/profile.jl 0.00% 42 Missing ⚠️
src/apply-edit.jl 0.00% 9 Missing ⚠️
src/JETLS.jl 0.00% 4 Missing ⚠️
src/did-change-watched-files.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #355      +/-   ##
==========================================
- Coverage   65.65%   64.82%   -0.84%     
==========================================
  Files          41       42       +1     
  Lines        4222     4281      +59     
==========================================
+ Hits         2772     2775       +3     
- Misses       1450     1506      +56     
Flag Coverage Δ
JETLS.jl 64.82% <9.67%> (-0.84%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add a mechanism for capturing heap snapshots of the JETLS server process
to analyze memory footprint and detect potential memory leaks.

Creating a `.JETLSProfile` file in the workspace root triggers a heap
snapshot. The server saves it as `JETLS_YYYYMMDD_HHMMSS.heapsnapshot`,
shows a notification, and automatically deletes the trigger file via
LSP `workspace/applyEdit`.

The implementation uses `Profile.take_heap_snapshot` with streaming mode
and includes progress indicator support. The generated snapshots can be
analyzed using Chrome DevTools.

Written with Claude
@aviatesk aviatesk force-pushed the avi/memory-footprint branch from a13f483 to b93070a Compare December 3, 2025 12:00
@aviatesk aviatesk merged commit 86fa843 into master Dec 3, 2025
8 of 11 checks passed
@aviatesk aviatesk deleted the avi/memory-footprint branch December 3, 2025 12:35
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

Successfully merging this pull request may close these issues.

1 participant