Ouptut memory usage

This commit is contained in:
Jonathan Cremin 2015-08-11 21:54:55 +01:00
parent 05a6f5ca06
commit eaba18d6f5
4 changed files with 27 additions and 18 deletions

6
app.js
View file

@ -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;