Skip to content

Commit

Permalink
SIGUSR2でコンソールにmemoryUsageを吐く
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Aug 18, 2023
1 parent 27b247a commit 30f60c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if (process.env.UV_THREADPOOL_SIZE == null) {
process.env.UV_THREADPOOL_SIZE = uvThreadpoolSize.toString();
}

process.on('SIGUSR2', () => {
console.log(JSON.stringify({ memoryUsage: process.memoryUsage() }));
});

import * as os from 'os';
import * as cluster from 'cluster';
import Xev from 'xev';
Expand Down

0 comments on commit 30f60c4

Please sign in to comment.