Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var collectionNames = db.getCollectionNames(), stats = [];
- collectionNames.forEach(function (n) { stats.push(db[n].stats()); });
- stats = stats.sort(function(a, b) { return b['storageSize'] - a['storageSize']; });
- for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['storageSize']); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement