File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 3333 node-version : ' 16'
3434
3535 - name : Install dependencies
36- run : npm install
36+ run : |
37+ npm install
38+ npm install ts-node
3739
3840 # - name: Setup database and engine
3941 # id: setup
5456 FIREBOLT_CLIENT_ID : ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
5557 FIREBOLT_CLIENT_SECRET : ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}
5658 run : |
57- npx ts-node scripts/memory-test.ts
59+ node -r ' ts-node/register' --expose-gc scripts/memory-test.ts
5860
5961
6062 # Need to pull the pages branch in order to fetch the previous runs
Original file line number Diff line number Diff 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 ) /
You can’t perform that action at this time.
0 commit comments