show 3 digits

v1.18.x
Baris Usakli 8 years ago
parent cf444755df
commit 7fe239229d

@ -206,18 +206,18 @@ mongoModule.info = function (db, callback) {
stats.mem = results.serverStatus.mem; stats.mem = results.serverStatus.mem;
stats.mem = results.serverStatus.mem; stats.mem = results.serverStatus.mem;
stats.mem.resident = (stats.mem.resident / 1024).toFixed(2); stats.mem.resident = (stats.mem.resident / 1024).toFixed(3);
stats.mem.virtual = (stats.mem.virtual / 1024).toFixed(2); stats.mem.virtual = (stats.mem.virtual / 1024).toFixed(3);
stats.mem.mapped = (stats.mem.mapped / 1024).toFixed(2); stats.mem.mapped = (stats.mem.mapped / 1024).toFixed(3);
stats.collectionData = results.listCollections; stats.collectionData = results.listCollections;
stats.network = results.serverStatus.network; stats.network = results.serverStatus.network;
stats.raw = JSON.stringify(stats, null, 4); stats.raw = JSON.stringify(stats, null, 4);
stats.avgObjSize = stats.avgObjSize.toFixed(2); stats.avgObjSize = stats.avgObjSize.toFixed(2);
stats.dataSize = (stats.dataSize / scale).toFixed(2); stats.dataSize = (stats.dataSize / scale).toFixed(3);
stats.storageSize = (stats.storageSize / scale).toFixed(2); stats.storageSize = (stats.storageSize / scale).toFixed(3);
stats.fileSize = stats.fileSize ? (stats.fileSize / scale).toFixed(2) : 0; stats.fileSize = stats.fileSize ? (stats.fileSize / scale).toFixed(3) : 0;
stats.indexSize = (stats.indexSize / scale).toFixed(2); stats.indexSize = (stats.indexSize / scale).toFixed(3);
stats.storageEngine = results.serverStatus.storageEngine ? results.serverStatus.storageEngine.name : 'mmapv1'; stats.storageEngine = results.serverStatus.storageEngine ? results.serverStatus.storageEngine.name : 'mmapv1';
stats.host = results.serverStatus.host; stats.host = results.serverStatus.host;
stats.version = results.serverStatus.version; stats.version = results.serverStatus.version;

@ -152,7 +152,7 @@ redisModule.info = function (cxn, callback) {
redisData[parts[0]] = parts[1]; redisData[parts[0]] = parts[1];
} }
}); });
redisData.used_memory_human = (redisData.used_memory / (1024 * 1024 * 1024)).toFixed(2); redisData.used_memory_human = (redisData.used_memory / (1024 * 1024 * 1024)).toFixed(3);
redisData.raw = JSON.stringify(redisData, null, 4); redisData.raw = JSON.stringify(redisData, null, 4);
redisData.redis = true; redisData.redis = true;

Loading…
Cancel
Save