diff options
author | jmmv <jmmv@google.com> | 2018-07-12 02:20:04 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-12 02:21:12 -0700 |
commit | e77cf0229db79f3b18e5a0a4934b09360ccc175b (patch) | |
tree | c732bab18bfd4a8f72fb10c8545b20024feffd5f /.bazelci | |
parent | 1fdcd74798a3ed44bcfc90e22b4c65d59765aa82 (diff) |
Make spend_cpu_time more reliable by tracking time.
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
Diffstat (limited to '.bazelci')
-rw-r--r-- | .bazelci/presubmit.yml | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 631593930b..52aab52039 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -74,9 +74,6 @@ platforms: - "//tools/android/..." # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663 - "-//src/test/shell/bazel/android:android_ndk_integration_test" - # Re-enable once fixed: b/110456205 - - "-//src/test/java/com/google/devtools/build/lib/shell:ShellTests" - - "-//src/test/shell/integration:process_wrapper_test" # The below tests have been disabled because they are too slow on macOS. # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4684 - "-//src/test/shell/bazel:bazel_determinism_test" |