Skip to content

Commit 4a995b1

Browse files
Abseil Teamrogeeff
authored andcommitted
Export of internal Abseil changes
-- 35df3686d19c2864fea8796e109c76e179c3375e by Derek Mauro <[email protected]>: Internal change PiperOrigin-RevId: 401769948 -- fcfe13483862a7c11c0bee789ca8d6f47d31860a by Derek Mauro <[email protected]>: Update Google Benchmark dependency PiperOrigin-RevId: 401528577 GitOrigin-RevId: 35df3686d19c2864fea8796e109c76e179c3375e Change-Id: I7a5123ea37de10e5bde9c9c74faa7e43d80490ca
1 parent 59672be commit 4a995b1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ http_archive(
2929

3030
# Google benchmark.
3131
http_archive(
32-
name = "com_github_google_benchmark", # 2021-07-01T09:02:54Z
33-
sha256 = "1cb4b97a90aa1fd9c8e412a6bc29fc13fc140162a4a0db3811af40befd8c9ea5",
34-
strip_prefix = "benchmark-e451e50e9b8af453f076dec10bd6890847f1624e",
35-
urls = ["https://github.com/google/benchmark/archive/e451e50e9b8af453f076dec10bd6890847f1624e.zip"],
32+
name = "com_github_google_benchmark", # 2021-09-20T09:19:51Z
33+
sha256 = "62e2f2e6d8a744d67e4bbc212fcfd06647080de4253c97ad5c6749e09faf2cb0",
34+
strip_prefix = "benchmark-0baacde3618ca617da95375e0af13ce1baadea47",
35+
urls = ["https://github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.zip"],
3636
)
3737

3838
# C++ rules for Bazel.

absl/synchronization/mutex_benchmark.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void BM_MutexEnqueue(benchmark::State& state) {
9797
// Mutex queueing behavior is modified.
9898
const bool multiple_priorities = state.range(0);
9999
ScopedThreadMutexPriority priority_setter(
100-
(multiple_priorities && state.thread_index != 0) ? 1 : 0);
100+
(multiple_priorities && state.thread_index() != 0) ? 1 : 0);
101101

102102
struct Shared {
103103
absl::Mutex mu;
@@ -176,7 +176,7 @@ BENCHMARK(BM_MutexEnqueue)
176176

177177
template <typename MutexType>
178178
void BM_Contended(benchmark::State& state) {
179-
int priority = state.thread_index % state.range(1);
179+
int priority = state.thread_index() % state.range(1);
180180
ScopedThreadMutexPriority priority_setter(priority);
181181

182182
struct Shared {
@@ -196,7 +196,7 @@ void BM_Contended(benchmark::State& state) {
196196
// To achieve this amount of local work is multiplied by number of threads
197197
// to keep ratio between local work and critical section approximately
198198
// equal regardless of number of threads.
199-
DelayNs(100 * state.threads, &local);
199+
DelayNs(100 * state.threads(), &local);
200200
RaiiLocker<MutexType> locker(&shared->mu);
201201
DelayNs(state.range(0), &shared->data);
202202
}

0 commit comments

Comments
 (0)