Ouptut memory usage
This commit is contained in:
parent
05a6f5ca06
commit
eaba18d6f5
4 changed files with 27 additions and 18 deletions
6
app.js
6
app.js
|
@ -11,7 +11,6 @@ import { events as userEvents } from './api/routes/user';
|
|||
import web from './web/app';
|
||||
import { init as storageInit } from './lib/storage';
|
||||
|
||||
|
||||
import debugname from 'debug';
|
||||
const debug = debugname('hostr');
|
||||
|
||||
|
@ -48,6 +47,9 @@ if (!module.parent) {
|
|||
app.listen(process.env.PORT || 4040, function() {
|
||||
debug('Koa HTTP server listening on port ' + (process.env.PORT || 4040));
|
||||
});
|
||||
setInterval(function() {
|
||||
debug('%sMB', process.memoryUsage().rss / 1024 / 1024);
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
module.exports = app;
|
||||
export default app;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue