mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
@@ -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)[]) {
|
||||
|
||||
Reference in New Issue
Block a user