[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: |
|
||||||||||||
| 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 |