1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Fix megabyte symbol, should be MB

This commit is contained in:
jbranchaud
2020-06-06 13:02:02 -05:00
parent ab18922c57
commit c87a6ec2ad

View File

@@ -10,11 +10,11 @@ size metrics for all of our database's collections:
```javascript ```javascript
> db.getCollectionNames().forEach(function (collectionName) { > db.getCollectionNames().forEach(function (collectionName) {
sizeInMb = db[collectionName].stats({ scale: 1024 * 1024 }).size; sizeInMb = db[collectionName].stats({ scale: 1024 * 1024 }).size;
print(collectionName + ": " + sizeInMb + "Mb"); print(collectionName + ": " + sizeInMb + "MB");
}) })
books: 10Mb books: 10MB
authors: 2Mb authors: 2MB
genres: 1Mb genres: 1MB
``` ```
This snippet gets all the collections for the current database and iterates This snippet gets all the collections for the current database and iterates