parent
bd81a6c8ad
commit
ec683f04d1
|
|
@ -25,11 +25,13 @@ async function measureMemory() {
|
|||
const startTime = Date.now();
|
||||
|
||||
// Start the Misskey backend server using fork to enable IPC
|
||||
const serverProcess = fork(join(__dirname, '../built/boot/entry.js'), [], {
|
||||
const serverProcess = fork(join(__dirname, '../built/boot/entry.js'), ['expose-gc'], {
|
||||
cwd: join(__dirname, '..'),
|
||||
env: {
|
||||
...process.env,
|
||||
NODE_ENV: 'test',
|
||||
NODE_ENV: 'production',
|
||||
MK_DISABLE_CLUSTERING: '1',
|
||||
MK_FORCE_GC: '1',
|
||||
},
|
||||
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -86,6 +86,10 @@ if (!envOption.disableClustering) {
|
|||
ev.mount();
|
||||
}
|
||||
|
||||
if (envOption.forceGc && global.gc != null) {
|
||||
global.gc();
|
||||
}
|
||||
|
||||
readyRef.value = true;
|
||||
|
||||
// ユニットテスト時にMisskeyが子プロセスで起動された時のため
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const envOption = {
|
|||
verbose: false,
|
||||
withLogTime: false,
|
||||
quiet: false,
|
||||
forceGc: false,
|
||||
};
|
||||
|
||||
for (const key of Object.keys(envOption) as (keyof typeof envOption)[]) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue