mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
|
diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
|
||
|
index 66bc5d8..d33991d 100644
|
||
|
--- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
|
||
|
+++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
|
||
|
@@ -162,7 +162,7 @@ static void teardown() {
|
||
|
*/
|
||
|
static void BM_Cq_Throughput(benchmark::State& state) {
|
||
|
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
|
||
|
- auto thd_idx = state.thread_index;
|
||
|
+ auto thd_idx = state.thread_index();
|
||
|
|
||
|
gpr_mu_lock(&g_mu);
|
||
|
g_threads_active++;
|
||
|
diff --git a/test/cpp/microbenchmarks/bm_threadpool.cc b/test/cpp/microbenchmarks/bm_threadpool.cc
|
||
|
index dd57bce..82cd08e 100644
|
||
|
--- a/test/cpp/microbenchmarks/bm_threadpool.cc
|
||
|
+++ b/test/cpp/microbenchmarks/bm_threadpool.cc
|
||
|
@@ -153,11 +153,11 @@ class SuicideFunctorForAdd : public grpc_completion_queue_functor {
|
||
|
static void BM_ThreadPoolExternalAdd(benchmark::State& state) {
|
||
|
static grpc_core::ThreadPool* external_add_pool = nullptr;
|
||
|
// Setup for each run of test.
|
||
|
- if (state.thread_index == 0) {
|
||
|
+ if (state.thread_index() == 0) {
|
||
|
const int num_threads = state.range(1);
|
||
|
external_add_pool = new grpc_core::ThreadPool(num_threads);
|
||
|
}
|
||
|
- const int num_iterations = state.range(0) / state.threads;
|
||
|
+ const int num_iterations = state.range(0) / state.threads();
|
||
|
while (state.KeepRunningBatch(num_iterations)) {
|
||
|
BlockingCounter counter(num_iterations);
|
||
|
for (int i = 0; i < num_iterations; ++i) {
|
||
|
@@ -167,7 +167,7 @@ static void BM_ThreadPoolExternalAdd(benchmark::State& state) {
|
||
|
}
|
||
|
|
||
|
// Teardown at the end of each test run.
|
||
|
- if (state.thread_index == 0) {
|
||
|
+ if (state.thread_index() == 0) {
|
||
|
state.SetItemsProcessed(state.range(0));
|
||
|
delete external_add_pool;
|
||
|
}
|