[SERVER-67102] Avoid unnecessary string copies in Resource Consumption metrics Created: 08/Jun/22 Updated: 29/Oct/23 Resolved: 07/Jul/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0, 6.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jordi Olivares Provencio | Assignee: | Jordi Olivares Provencio |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Execution Team 2022-07-11 | ||||
| Participants: | |||||
| Linked BF Score: | 100 | ||||
| Description |
|
It seems that the api to increment metrics requires a full string value even though the string is only used for debug logging This leads to callers needing to construct temporary strings that will allocate and deallocate from the heap immediately afterwards. Ideally this should be replaced by a StringData object to avoid memory allocations plus copying. |
| Comments |
| Comment by Githook User [ 29/Aug/22 ] |
|
Author: {'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}Message: |
| Comment by Githook User [ 07/Jul/22 ] |
|
Author: {'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}Message: |