[Dashboard] Display actor task execution info (#6705)

Co-authored-by: Philipp Moritz <pcmoritz@gmail.com>
This commit is contained in:
Yunzhi Zhang
2020-01-22 22:33:55 -08:00
committed by Philipp Moritz
co-authored by Philipp Moritz
parent ae9a3a2237
commit 0834bda8c1
12 changed files with 320 additions and 36 deletions
+6
View File
@@ -1189,6 +1189,7 @@ void CoreWorker::HandleGetCoreWorkerStats(const rpc::GetCoreWorkerStatsRequest &
(*used_resources_map)[it.first] = quantity;
}
stats->set_webui_display(webui_display_);
stats->set_actor_title(actor_title_);
MemoryStoreStats memory_store_stats = memory_store_->GetMemoryStoreStatisticalData();
stats->set_num_local_objects(memory_store_stats.num_local_objects);
stats->set_used_object_store_memory(memory_store_stats.used_object_store_memory);
@@ -1225,4 +1226,9 @@ void CoreWorker::SetWebuiDisplay(const std::string &message) {
webui_display_ = message;
}
void CoreWorker::SetActorTitle(const std::string &title) {
absl::MutexLock lock(&mutex_);
actor_title_ = title;
}
} // namespace ray
+5
View File
@@ -99,6 +99,8 @@ class CoreWorker : public rpc::CoreWorkerServiceHandler {
void SetWebuiDisplay(const std::string &message);
void SetActorTitle(const std::string &title);
/// Increase the reference count for this object ID.
/// Increase the local reference count for this object ID. Should be called
/// by the language frontend when a new reference is created.
@@ -657,6 +659,9 @@ class CoreWorker : public rpc::CoreWorkerServiceHandler {
/// String to be displayed on Web UI.
std::string webui_display_ GUARDED_BY(mutex_);
/// Actor title that consists of class name, args, kwargs for actor construction.
std::string actor_title_ GUARDED_BY(mutex_);
/// Number of tasks that have been pushed to the actor but not executed.
std::atomic<int64_t> task_queue_length_;
+2
View File
@@ -214,4 +214,6 @@ message CoreWorkerStats {
int32 task_queue_length = 13;
// Number of executed tasks.
int32 num_executed_tasks = 14;
// Actor constructor.
string actor_title = 15;
}
+27
View File
@@ -0,0 +1,27 @@
syntax = "proto3";
package ray.rpc;
import "src/ray/protobuf/common.proto";
message GetProfilingStatsRequest {
// PID of the worker process.
uint32 pid = 1;
// Duration of the profiling in seconds.
int32 duration = 2;
}
message GetProfilingStatsReply {
// Profiling stats.
string profiling_stats = 1;
// Standard output of the profiler process.
string stdout = 2;
// Standard error of the profiler process.
string stderr = 3;
}
// Service for communicating with the reporter.py process on a remote node.
service ReporterService {
// Get the profiling stats.
rpc GetProfilingStats(GetProfilingStatsRequest) returns (GetProfilingStatsReply);
}