-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: JavaScript, Shell
-
Fully Compatible
Problem:
db.collection.stats() allows you to pass in a scale, making the output easier to read, for example
> db.blogs.stats()
{
"ns" : "scaleout.blogs",
"count" : 1950437,
"size" : 210646912,
"avgObjSize" : 107.99985439160557,
"storageSize" : 272485632,
"numExtents" : 17,
"nindexes" : 2,
"lastExtentSize" : 51938304,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 175284224,
"indexSizes" :
,
"ok" : 1
}
> db.blogs.stats(1024)
{
"ns" : "scaleout.blogs",
"count" : 1950437,
"size" : 205709,
"avgObjSize" : 0.10546815918688991,
"storageSize" : 266099,
"numExtents" : 17,
"nindexes" : 2,
"lastExtentSize" : 50721,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 171176,
"indexSizes" :
,
"ok" : 1
}
However, db.printCollectionStats() does not accept this scale parameter, making the output harder to read
> db.printCollectionStats()
blogs
{
"ns" : "scaleout.blogs",
"count" : 1950437,
"size" : 210646912,
"avgObjSize" : 107.99985439160557,
"storageSize" : 272485632,
"numExtents" : 17,
"nindexes" : 2,
"lastExtentSize" : 51938304,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 175284224,
"indexSizes" :
,
"ok" : 1
}
Solution:
Allow db.printCollectionStats() to take a scaling argument.
Business Case:
Ease of use