You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2023. It is now read-only.
I am trying to understand why the CPU time is inferred as the sum of user time and system time through getrusagehere in ProcessCounters.cpp .
CPU time of process to me is the time when the process is executing instructions on CPU and is not idle. Ideally, the code should not include the time when the CPU is idle due to waiting on I/O or due to lock.
I ran an experiment reading large CSV files which is an IO-bound task (CMIIW) and this number (rusageStats.ru_utime + rusageStats.ru_stime) starts incrementing quickly and according to the definition, it should not grow with quickly large numbers as the CPU will be idle for this process.
Can you suggest some experiments which I can run on my emulators or device to validate that this time will not increment if I keep my CPU idle or stalled due to some external resource?
Hey,
I am trying to understand why the CPU time is inferred as the sum of user time and system time through
getrusagehere inProcessCounters.cpp.CPU time of process to me is the time when the process is executing instructions on CPU and is not idle. Ideally, the code should not include the time when the CPU is idle due to waiting on I/O or due to lock.
Resources: http://www.brendangregg.com/blog/2017-05-09/cpu-utilization-is-wrong.html
I ran an experiment reading large CSV files which is an IO-bound task (CMIIW) and this number (
rusageStats.ru_utime + rusageStats.ru_stime) starts incrementing quickly and according to the definition, it should not grow with quickly large numbers as the CPU will be idle for this process.Can you suggest some experiments which I can run on my emulators or device to validate that this time will not increment if I keep my CPU idle or stalled due to some external resource?