[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: SERVER-68086 fix per action function action cpu usage
Branch: master
https://github.com/mongodb/mongo/commit/bcabe186e74012a43aaa3596b1e0d72735853b6e

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