Skip to content

Minor: specify measure in bytes #1207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/faq/storage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ The following example issues :method:`db.collection.stats()` for the

To view specific measures of size, use these methods:

- :method:`db.collection.dataSize()`: data size for the collection.
- :method:`db.collection.storageSize()`: allocation size, including unused space.
- :method:`db.collection.totalSize()`: the data size plus the index size.
- :method:`db.collection.totalIndexSize()`: the index size.
- :method:`db.collection.dataSize()`: data size in bytes for the collection.
- :method:`db.collection.storageSize()`: allocation size in bytes, including unused space.
- :method:`db.collection.totalSize()`: the data size plus the index size in bytes.
- :method:`db.collection.totalIndexSize()`: the index size in bytes.

Also, the following scripts print the statistics for each database and
collection:
Expand Down
4 changes: 2 additions & 2 deletions source/includes/ref-toc-method-collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ description: "Reports on the state of a collection. Provides a wrapper around th
---
name: ":method:`db.collection.storageSize()`"
file: /reference/method/db.collection.storageSize
description: "Reports the total size used by the collection. Provides a wrapper around the :data:`~collStats.storageSize` field of the :dbcommand:`collStats` output."
description: "Reports the total size used by the collection in bytes. Provides a wrapper around the :data:`~collStats.storageSize` field of the :dbcommand:`collStats` output."
---
name: ":method:`db.collection.totalSize()`"
file: /reference/method/db.collection.totalSize
Expand All @@ -121,4 +121,4 @@ description: "Modifies a document in a collection."
name: ":method:`db.collection.validate()`"
file: /reference/method/db.collection.validate
description: "Performs diagnostic operations on a collection."
...
...
4 changes: 2 additions & 2 deletions source/reference/command/collStats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Definition
"count" : 9, // number of documents
"size" : 432, // collection size in bytes
"avgObjSize" : 48, // average object size in bytes
"storageSize" : 3840, // (pre)allocated space for the collection
"storageSize" : 3840, // (pre)allocated space for the collection in bytes
"numExtents" : 1, // number of extents (contiguously allocated chunks of datafile space)
"nindexes" : 2, // number of indexes
"lastExtentSize" : 3840, // size of the most recently created extent
"lastExtentSize" : 3840, // size of the most recently created extent in bytes
"paddingFactor" : 1, // padding can speed up updates if documents grow
"flags" : 1,
"totalIndexSize" : 16384, // total index size in bytes
Expand Down