11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst { Worker } = require('worker_threads'); 41cb0ef41Sopenharmony_ciconst path = require('path'); 51cb0ef41Sopenharmony_ciconst max_snapshots = parseInt(process.env.TEST_SNAPSHOTS) || 1; 61cb0ef41Sopenharmony_cinew Worker(path.join(__dirname, 'grow.js'), { 71cb0ef41Sopenharmony_ci execArgv: [ 81cb0ef41Sopenharmony_ci `--heapsnapshot-near-heap-limit=${max_snapshots}`, 91cb0ef41Sopenharmony_ci ], 101cb0ef41Sopenharmony_ci resourceLimits: { 111cb0ef41Sopenharmony_ci maxOldGenerationSizeMb: 121cb0ef41Sopenharmony_ci parseInt(process.env.TEST_OLD_SPACE_SIZE) || 20 131cb0ef41Sopenharmony_ci } 141cb0ef41Sopenharmony_ci}); 15