[SERVER-81987] Implement a structure to keep metrics in queryStats Created: 09/Oct/23  Updated: 14/Dec/23  Resolved: 14/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-84128 Replace std::integral<T> concept with... Closed
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-10-16, QO 2023-10-30, QO 2023-11-13, QO 2023-11-27, QO 2023-12-11, QO 2023-12-25
Participants:
Linked BF Score: 165

 Description   

The queryStats in memory structure need not allocate memory for the structures that are not used. Since optimizer metrics collection in queryStats is not enabled by default the optimizer will not allocate the memory for those unless internalCollectQueryOptimizerMetrics is set.
Instead QueryStatsEntry will have a pointer to QueryOptimizerMetrics which will be allocated only if internalCollectQueryOptimizerMetrics is set; QueryOptimizerMetrics in turn is an unordered_map<std::string, OptimizerMetricsBucket>. The query key in the map encodes the properties of the collected data, such as “cqf-collscan_only” etc.



 Comments   
Comment by Githook User [ 14/Dec/23 ]

Author:

{'name': 'Misha Tyulenev', 'email': 'misha.tyulenev@mongodb.com', 'username': ''}

Message: SERVER-81987 add a structure for storing and updating supplemental metrics

GitOrigin-RevId: b5cdf6182c4809e300ad8d60650721d914937799
Branch: master
https://github.com/mongodb/mongo/commit/cf2c2b5fe8982a2bd74c0d3e986e89051b243d6c

Comment by Githook User [ 13/Dec/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-81987 add a structure for storing and updating supplemental metrics"

This reverts commit 6dce25307fd1190e160e189f33afb9ae8905f08c.

GitOrigin-RevId: d7a12a8347aca6c9cad2a57111c0bbd29337d565
Branch: master
https://github.com/mongodb/mongo/commit/690f88541adccee4827cbe6b74ee2fa1cedc8b42

Comment by Githook User [ 12/Dec/23 ]

Author:

{'name': 'Misha Tyulenev', 'email': 'misha.tyulenev@mongodb.com', 'username': ''}

Message: SERVER-81987 add a structure for storing and updating supplemental metrics

GitOrigin-RevId: 6dce25307fd1190e160e189f33afb9ae8905f08c
Branch: master
https://github.com/mongodb/mongo/commit/86fa075ea182fd1df1468eb3e1ad271f214642b0

Generated at Thu Feb 08 06:47:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.