[SERVER-68086] per action function action cpu usage is incorrect Created: 15/Jul/22 Updated: 29/Oct/23 Resolved: 25/Jul/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Moody | Assignee: | Daniel Moody |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Dev Platform 2022-07-25 |
| Participants: |
| Description |
|
I made an assumption that each function action gets its own thread, but scons internally uses a thread pool, so actually the thread is alive the whole build, just getting new tasks to execute. I used the thread_time_ns function to check the current thread cpu usage, but that wont work if the threads are shared. I think just taking a snapshot of the thread_time_ns before running the function and then calculating the difference after will work |
| Comments |
| Comment by Githook User [ 15/Jul/22 ] |
|
Author: {'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}Message: |