[DOCS-8914] Document the $collStats aggregation source Created: 28/Sep/16  Updated: 02/Nov/16  Resolved: 28/Oct/16

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 3.4.0

Type: Task Priority: Critical - P2
Reporter: Emily Hall Assignee: Andrew Aldridge
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DOCS-8263 Operation latency histogram Closed
Documented
documents SERVER-5905 Add data collection and command to ge... Closed
documents SERVER-24496 Merge collStats output with $collStat... Closed
Related
related to DOCS-8165 Document the operation latency histogram Closed
Participants:
Days since reply: 7 years, 15 weeks, 5 days ago
Epic Link: 3.4 Agg/Arrays
Story Points: 2

 Description   

$collStats is a new aggregation source in MongoDB 3.4. It provides a superset of the information available via the db.collection.stats() shell helper available in 3.2.

$collStats must be the first stage in a pipeline.

Synopsis:

db.collection.aggregate(
    { $collStats: 
        latencyStats: <document>,
        storageStats: {}
    }
)

Both latencyStats and storageStats are optional.

storageStats gives you storage-level statistics about a collection. It's exactly the same output as the old db.collection.stats() shell helper. This can only be specified on a collection; attempting it on a view results in the error CommandNotSupportedOnView.

latencyStats gives information about latencies for reads, writes and commands on a given namespace. It can be run on both views and collections. The latencyStats field must be a document that itself has one field, histograms. If histograms is true, the command returns the full operation latency histograms for that namespace. If false, the full histogram is omitted and only a summary is output.

*Note from allison.moore@mongodb.com*: We'll need to a reference page for the new $collStats pipeline operator.



 Comments   
Comment by Githook User [ 28/Oct/16 ]

Author:

{u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}

Message: DOCS-8914: Add $collStats aggregation operator

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/2622ce01ac809af62000b73593a6c66003c26b24

Generated at Thu Feb 08 07:57:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.