SERVER-104648ClosedFixed

Add memory tracking stats to QueryStats

SPM-3716 added memory tracking stats to system.profiler. We should extend this to include these metrics in $queryStats. This includes adding peakTrackedMemBytes as a metric to query stats. We should also aggregate this metric (either with sum or max) across all shards and mongos for query stats on mongos.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.0.0-rc0
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
availability-prevent-server-querydino-90-desiredor-workload-management