Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
0fa8fbd
fork and prepare
enisdenjo Mar 26, 2025
21680d6
WIP
enisdenjo Mar 26, 2025
28d3028
prepare fixtures
enisdenjo Jul 31, 2025
fe99956
heapsnapshot ready
enisdenjo Jul 31, 2025
df1c75e
snaploader can get dispatcher or progress
enisdenjo Jul 31, 2025
c753e7d
use linked heapsnap
enisdenjo Jul 31, 2025
0bf4d34
parse heap snapshot
enisdenjo Jul 31, 2025
53e0df1
proper worker url
enisdenjo Jul 31, 2025
61804ad
report problem to progress and remove console.time
enisdenjo Jul 31, 2025
404656b
actually use silent
enisdenjo Jul 31, 2025
d2c10d0
no sourcemap
enisdenjo Jul 31, 2025
3eabe77
build and commit
enisdenjo Jul 31, 2025
b9e75b6
simpler names
enisdenjo Jul 31, 2025
e03bc54
leaking objects
enisdenjo Jul 31, 2025
a0d1cd1
ready up!
enisdenjo Jul 31, 2025
78af760
rename
enisdenjo Jul 31, 2025
1343a91
return of heapsampling
enisdenjo Jul 31, 2025
28e8437
refactor and prepare memtests for heapsnapshot diffs
enisdenjo Jul 31, 2025
1bf5c54
do heap snap diff
enisdenjo Jul 31, 2025
f8273ea
rapid
enisdenjo Jul 31, 2025
2d413cc
clean and write heapsnap where needed
enisdenjo Jul 31, 2025
195a2a1
better name
enisdenjo Jul 31, 2025
6631475
imports
enisdenjo Jul 31, 2025
3b7a7f4
better error
enisdenjo Jul 31, 2025
aa044c3
use si prefix and tab
enisdenjo Jul 31, 2025
5e8b9c1
no space
enisdenjo Jul 31, 2025
b1de91f
no expect
enisdenjo Jul 31, 2025
dec5af6
remove snaps if no leak
enisdenjo Jul 31, 2025
5b4257c
no bsp
enisdenjo Jul 31, 2025
4a28ad7
explain
enisdenjo Jul 31, 2025
07d42dc
start time in heapsnaps for loadtests
enisdenjo Jul 31, 2025
c589f4b
support huge files
enisdenjo Jul 31, 2025
24045d2
unused import
enisdenjo Jul 31, 2025
d2c27d0
shorten and no rapid (no need because heapsnaps)
enisdenjo Aug 2, 2025
04a0222
silent parsing
enisdenjo Aug 2, 2025
dfe8f20
more info
enisdenjo Aug 2, 2025
67acd8c
as much as possible details
enisdenjo Aug 2, 2025
581eff3
freed nothing
enisdenjo Aug 2, 2025
79b52ad
better
enisdenjo Aug 2, 2025
4c5a739
bytes to human
enisdenjo Aug 2, 2025
5e2d1e9
export diff
enisdenjo Aug 2, 2025
437b3b7
actuall diff
enisdenjo Aug 2, 2025
9f1e73f
leaking objects grow in every snapshot
enisdenjo Aug 2, 2025
7d32447
no count > 10
enisdenjo Aug 2, 2025
aba7f13
no expected heavy frames
enisdenjo Aug 2, 2025
55f80ad
no compile code
enisdenjo Aug 2, 2025
a323d1c
more runs
enisdenjo Aug 2, 2025
d142c84
explain
enisdenjo Aug 2, 2025
ea467b6
drop unused
enisdenjo Aug 2, 2025
628b4b7
format
enisdenjo Aug 2, 2025
c2b8a98
no retries
enisdenjo Aug 2, 2025
26f3151
no bun test
enisdenjo Aug 2, 2025
2697117
no tosorted
enisdenjo Aug 2, 2025
a1d8540
upload heapsnapshots
enisdenjo Aug 2, 2025
0f15cc0
use archives for heap snaps
enisdenjo Aug 2, 2025
1422791
use size delta and correctly assume first snap
enisdenjo Aug 2, 2025
6c54c48
maybe plural
enisdenjo Aug 2, 2025
9764b79
should switch first snap correctly
enisdenjo Aug 2, 2025
e148167
small leak in array test
enisdenjo Aug 2, 2025
a5c469b
typoes explanations and stuff
enisdenjo Aug 2, 2025
6f1fc1a
no system
enisdenjo Aug 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/memtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ jobs:
with:
key: docker-images-${{ runner.os }}-${{ steps.hash-docker-images.outputs.result }}
- name: Test
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
env:
E2E_GATEWAY_RUNNER: ${{matrix.e2e_runner}}
run: yarn test:mem ${{matrix.test_name}}
- name: Upload heap snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
timeout_minutes: 30
max_attempts: 5
command: yarn test:mem ${{matrix.test_name}}
# TODO: publish heap allocation sampling profile to artifact
name: ${{matrix.test_name}}-heap-snapshots
path: e2e/${{matrix.test_name}}/*.heapsnapshot
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
.DS_Store
dist/
!/internal/heapsnapshot/dist/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps indicate here why it's commited ?

bundle/
.yarn/*
!.yarn/patches
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ __generated__
/e2e/config-syntax-error/gateway.config.ts
/e2e/config-syntax-error/custom-resolvers.ts
CHANGELOG.md
/internal/heapsnapshot/dist/
5 changes: 0 additions & 5 deletions DEPS_RESOLUTIONS_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,3 @@ Here we collect reasons and write explanations about why some resolutions or pat
### vitest-tsconfig-paths

1. Resolve tsconfig paths in modules that have been [inlined](https://vitest.dev/config/#server-deps-inline).

### @memlab/core

1. Define package.json#export for `@memlab/core/Types`
1. Define package.json#export for `@memlab/core/Utils`
4 changes: 0 additions & 4 deletions e2e/auto-type-merging/auto-type-merging.memtest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ memtest(
}
}
`,
expectedHeavyFrame: (frame) =>
// allocates a lot but all is freed confirmed through heap snapshot
frame.name === 'set' &&
frame.callstack.some((frame) => frame.name === 'subschemaExecutor'),
},
async () =>
gateway({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ describe('upstream subscriptions via websockets', () => {
}
}
`,
expectedHeavyFrame: (frame) =>
// allocates a lot but all is freed confirmed through heap snapshot
frame.name === 'set' &&
frame.callstack.some(
(frame) =>
frame.name.includes('stitchingInfo') ||
frame.name.includes('batch'),
),
},
async () =>
gateway({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ memtest(
}
}
`,
expectedHeavyFrame: (frame) =>
// allocates a lot but all is freed confirmed through heap snapshot
frame.name === 'set' &&
frame.callstack.some((frame) => frame.name === 'createBatchingExecutor'),
},
async () =>
await gateway({
Expand Down
5 changes: 5 additions & 0 deletions internal/heapsnapshot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fork of [ChromeDevTools/devtools-frontend/[...]/heap_snapshot_worker](https://github.com/ChromeDevTools/devtools-frontend/blob/dd60dc9c8add93357dcffcfc3e2a9e5a31864413/front_end/entrypoints/heap_snapshot_worker) without the browser requirements, adapted for Node, with utilities for quick setup, parsing and analysis.

Please make sure to build and commit any changes done inside this package to allow for "buildless" testing.

This is the only package in the project that is used built (it's not listed in `tsconfig.json#paths`) because it uses worker threads and they need Node-ready JavaScript.
Loading
Loading