aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration/spend_cpu_time.cc
Commit message (Collapse)AuthorAge
* Make spend_cpu_time more reliable by tracking time.Gravatar jmmv2018-07-12
| | | | | | | | | | | | | | | | | | | | | | First, make the function that wastes user time keep track of how much processor time has been used so far, and make the function that wastes system time track overall wall time. This is to minimize the number of "overhead" system calls, which can tamper with our measurements. Second, make the loop of the function that wastes user time more costly so that modern processors don't run it too fast. Otherwise, the overhead to track used time becomes significant in system time and makes our tests fail. This should fix the flakiness observed in our process-wrapper tests when run on the modern CPUs that the iMac Pros carry. Tested: I haven't been able to reproduce the flakiness. Running the spend_cpu_time binary by hand reports very accurate timings for both system and user time, even when pausing the program while it runs. RELNOTES: None. PiperOrigin-RevId: 204264910
* Be more generous with user time and system time bounds for execution ↵Gravatar ruperts2018-06-19
| | | | | | | statistics tests, and increase granularity of the waits. RELNOTES: None. PiperOrigin-RevId: 201254824
* Make process-wrapper output execution statistics for executed commands.Gravatar ruperts2017-11-28
For example, it now outputs resource usage statistics like the amount of user time and system time used. RELNOTES: None PiperOrigin-RevId: 177263221