Merge pull request #324 from CartoDB/memory-stats

Send memory usage stats
This commit is contained in:
Raul Ochoa 2015-08-06 16:12:18 +02:00
commit ea7a5da1c1
4 changed files with 13 additions and 3 deletions

View File

@ -1,9 +1,12 @@
# Changelog
## 2.8.1
## 2.9.0
Released 2015-mm-dd
New features:
- Send memory usage stats
## 2.8.0

7
app.js
View File

@ -86,6 +86,13 @@ if (global.statsClient) {
global.statsClient.gauge(keyPrefix + 'unused', status.unused);
global.statsClient.gauge(keyPrefix + 'waiting', status.waiting);
});
setInterval(function() {
var memoryUsage = process.memoryUsage();
Object.keys(memoryUsage).forEach(function(k) {
global.statsClient.gauge('windshaft.memory.' + k, memoryUsage[k]);
});
}, 5000);
}
// Maximum number of connections for one process

2
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{
"name": "windshaft-cartodb",
"version": "2.8.1",
"version": "2.9.0",
"dependencies": {
"cartodb-psql": {
"version": "0.4.0",

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "windshaft-cartodb",
"version": "2.8.1",
"version": "2.9.0",
"description": "A map tile server for CartoDB",
"keywords": [
"cartodb"