about summary refs log tree commit diff
path: root/absl/synchronization/mutex_benchmark.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-07-23T15·19-0700
committerMatt Calabrese <calabrese@x.team>2018-07-24T19·36-0400
commit9e060686d1c325f34f9806b45fe77bafeed00aee (patch)
treecf366876c1c9ec1ec63b95e4cba67c3e893409ea /absl/synchronization/mutex_benchmark.cc
parent7aa411ceafc1272a28579cca739a97a2fb79055a (diff)
Export of internal Abseil changes.
--
ee644a89fb1429d9337852690a01182853f68964 by Derek Mauro <dmauro@google.com>:

Lower the thread limit in the Mutex benchmark on some platforms.
https://github.com/abseil/abseil-cpp/issues/147

PiperOrigin-RevId: 205663768
GitOrigin-RevId: ee644a89fb1429d9337852690a01182853f68964
Change-Id: Ic5db4061809aa65f73e6a63dba90b2554376b38c
Diffstat (limited to 'absl/synchronization/mutex_benchmark.cc')
-rw-r--r--absl/synchronization/mutex_benchmark.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/absl/synchronization/mutex_benchmark.cc b/absl/synchronization/mutex_benchmark.cc
index 30a523556c3d..1e019e001ae4 100644
--- a/absl/synchronization/mutex_benchmark.cc
+++ b/absl/synchronization/mutex_benchmark.cc
@@ -74,11 +74,11 @@ void BM_ConditionWaiters(benchmark::State& state) {
   mu.Unlock();
 }
 
-#ifdef THREAD_SANITIZER
-// ThreadSanitizer can't handle 8192 threads.
-constexpr int kMaxConditionWaiters = 2048;
-#else
+// Some configurations have higher thread limits than others.
+#if defined(__linux__) && !defined(THREAD_SANITIZER)
 constexpr int kMaxConditionWaiters = 8192;
+#else
+constexpr int kMaxConditionWaiters = 1024;
 #endif
 BENCHMARK(BM_ConditionWaiters)->RangePair(0, 2, 1, kMaxConditionWaiters);