[SERVER-67647] Potentially optimize mongo::MetricTree internal representation Created: 29/Jun/22  Updated: 05/Dec/22

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Daniel Morilha (Inactive) Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: save-for-celina
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-65987 ServerStatusMetric API refresh Closed
is related to SERVER-67333 ServerStatusMetric API refresh follow-up Closed
Assigned Teams:
Service Arch
Sprint: Service Arch 2022-09-05
Participants:

 Description   

mongo::MetricTree is used to gather ServerStatusMetricFields into a tree structure where only leaves represent metrics. They are later plotted in a BSON structure and sent over the wire.

Internally they are represented as two std::map where the key is a std::string; Leaves are exclusively persisted at the _metrics _ map while branches are represented as entirely new _MetricTree in the _subtrees map.

While this is correct, it is memory inefficient.

Acceptance Criteria: provide a better representation to MetricTree internals avoiding the usage of std::map


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