You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/15 15:36:47 UTC
[GitHub] [arrow] pitrou commented on a change in pull request #10042: ARROW-12395: Create RunInSerialExecutor benchmark
pitrou commented on a change in pull request #10042:
URL: https://github.com/apache/arrow/pull/10042#discussion_r614178556
##########
File path: cpp/src/arrow/util/thread_pool_benchmark.cc
##########
@@ -103,6 +103,22 @@ static void ThreadPoolSpawn(benchmark::State& state) { // NOLINT non-const refe
state.SetItemsProcessed(state.iterations() * nspawns);
}
+// Benchmark SerialExecutor::RunInSerialExecutor
+static void RunInSerialExecutor(benchmark::State& state) { // NOLINT non-const reference
+ const auto workload_size = static_cast<int32_t>(state.range(0));
+
+ Workload workload(workload_size);
+
+ for (auto _ : state) {
+ SerialExecutor::RunInSerialExecutor<arrow::detail::Empty>(
+ [&](internal::Executor* executor) {
+ return DeferNotOk(executor->Submit(workload));
Review comment:
Use `std::ref(workload)` for consistency with other benchmarks?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org