vlog default executor and its config usage

PiperOrigin-RevId: 553298440
This commit is contained in:
MediaPipe Team 2023-08-02 16:58:55 -07:00 committed by Copybara-Service
parent e56636b6d1
commit 9325af0af3
2 changed files with 5 additions and 0 deletions

View File

@ -358,6 +358,7 @@ cc_library(
"@com_google_absl//absl/container:fixed_array", "@com_google_absl//absl/container:fixed_array",
"@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
"@com_google_absl//absl/memory", "@com_google_absl//absl/memory",
"@com_google_absl//absl/status", "@com_google_absl//absl/status",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",

View File

@ -25,6 +25,7 @@
#include "absl/container/fixed_array.h" #include "absl/container/fixed_array.h"
#include "absl/container/flat_hash_set.h" #include "absl/container/flat_hash_set.h"
#include "absl/log/log.h"
#include "absl/memory/memory.h" #include "absl/memory/memory.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
@ -387,6 +388,7 @@ absl::Status CalculatorGraph::InitializeDefaultExecutor(
"", std::make_shared<internal::DelegatingExecutor>( "", std::make_shared<internal::DelegatingExecutor>(
std::bind(&internal::Scheduler::AddApplicationThreadTask, std::bind(&internal::Scheduler::AddApplicationThreadTask,
&scheduler_, std::placeholders::_1)))); &scheduler_, std::placeholders::_1))));
VLOG(1) << "Using default executor and application thread.";
return absl::OkStatus(); return absl::OkStatus();
} }
@ -406,6 +408,8 @@ absl::Status CalculatorGraph::InitializeDefaultExecutor(
} }
MP_RETURN_IF_ERROR( MP_RETURN_IF_ERROR(
CreateDefaultThreadPool(default_executor_options, num_threads)); CreateDefaultThreadPool(default_executor_options, num_threads));
VLOG(1) << absl::StrCat("Using default executor with num_threads: ",
num_threads);
return absl::OkStatus(); return absl::OkStatus();
} }