added memory info
This commit is contained in:
parent
0498591e4a
commit
114ceb1fc1
2 changed files with 10 additions and 3 deletions
|
@ -8,11 +8,11 @@
|
|||
"connectors": {
|
||||
"dummy": {
|
||||
"enabled": true,
|
||||
"duplexTimeout": 30
|
||||
"duplexTimeout": 300
|
||||
},
|
||||
"pocsag": {
|
||||
"enabled": true,
|
||||
"duplexTimeout": 30
|
||||
"duplexTimeout": 300
|
||||
},
|
||||
"lorawan": {
|
||||
"enabled": true,
|
||||
|
|
9
index.js
9
index.js
|
@ -54,5 +54,12 @@ app.get('/api/device/:id', async (req, res) => {
|
|||
: types.DeviceRegistry.DeviceStates[ req.params.id ]
|
||||
)
|
||||
})
|
||||
|
||||
const memstats = () => {
|
||||
const used = process.memoryUsage()
|
||||
for (let key in used) {
|
||||
console.log(`${key} ${Math.round(used[key] / 1024 / 1024 * 100) / 100} MB`)
|
||||
}
|
||||
}
|
||||
memstats()
|
||||
setInterval(memstats, 10e3)
|
||||
app.listen(3000)
|
Loading…
Add table
Reference in a new issue