Skip to content

Commit 54761a8

Browse files
committed
gc
1 parent f9caa7d commit 54761a8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/integration-tests-v2.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ jobs:
5454
FIREBOLT_CLIENT_ID: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
5555
FIREBOLT_CLIENT_SECRET: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}
5656
run: |
57-
npx ts-node scripts/memory-test.ts
57+
export NODE_OPTIONS="--expose-gc"
58+
npx ts-node scripts/memory-test.ts
5859
5960
6061
# Need to pull the pages branch in order to fetch the previous runs

scripts/memory-test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,12 @@ async function runMemoryTest(): Promise<void> {
154154
const currentMemory = process.memoryUsage();
155155
maxMemoryUsed = Math.max(maxMemoryUsed, currentMemory.heapUsed);
156156

157-
// Log progress every 25k rows and force GC to help with memory cleanup
157+
// Force garbage collection if available
158+
if (global.gc) {
159+
global.gc();
160+
}
161+
162+
// Log progress every 25k rows
158163
if (rowCount % 25000 === 0) {
159164
const currentGrowth =
160165
(currentMemory.heapUsed - initialMemory.heapUsed) /

0 commit comments

Comments
 (0)