File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ http_archive(
2929
3030# Google benchmark.
3131http_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.
Original file line number Diff line number Diff 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
177177template <typename MutexType>
178178void 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 }
You can’t perform that action at this time.
0 commit comments