mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05:00
Don't put entire actor registry in debug string since it's too long (#3395)
This commit is contained in:
parent
0d56fc10cc
commit
c2108ca64f
3 changed files with 21 additions and 20 deletions
|
@ -10,7 +10,6 @@ namespace raylet {
|
||||||
|
|
||||||
ActorRegistration::ActorRegistration(const ActorTableDataT &actor_table_data)
|
ActorRegistration::ActorRegistration(const ActorTableDataT &actor_table_data)
|
||||||
: actor_table_data_(actor_table_data),
|
: actor_table_data_(actor_table_data),
|
||||||
alive_(true),
|
|
||||||
execution_dependency_(ObjectID::nil()),
|
execution_dependency_(ObjectID::nil()),
|
||||||
frontier_() {}
|
frontier_() {}
|
||||||
|
|
||||||
|
@ -44,16 +43,7 @@ bool ActorRegistration::IsAlive() const {
|
||||||
return actor_table_data_.state == ActorState::ALIVE;
|
return actor_table_data_.state == ActorState::ALIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ActorRegistration::DebugString() const {
|
int ActorRegistration::NumHandles() const { return frontier_.size(); }
|
||||||
std::stringstream result;
|
|
||||||
if (alive_) {
|
|
||||||
result << "alive";
|
|
||||||
} else {
|
|
||||||
result << "dead";
|
|
||||||
}
|
|
||||||
result << ", num handles: " << frontier_.size();
|
|
||||||
return result.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace raylet
|
} // namespace raylet
|
||||||
|
|
||||||
|
|
|
@ -94,17 +94,15 @@ class ActorRegistration {
|
||||||
/// \return True if the local actor is alive and false if it is dead.
|
/// \return True if the local actor is alive and false if it is dead.
|
||||||
bool IsAlive() const;
|
bool IsAlive() const;
|
||||||
|
|
||||||
/// Returns debug string for class.
|
/// Returns num handles to this actor entry.
|
||||||
///
|
///
|
||||||
/// \return string.
|
/// \return int.
|
||||||
std::string DebugString() const;
|
int NumHandles() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Information from the global actor table about this actor, including the
|
/// Information from the global actor table about this actor, including the
|
||||||
/// node manager location.
|
/// node manager location.
|
||||||
ActorTableDataT actor_table_data_;
|
ActorTableDataT actor_table_data_;
|
||||||
/// True if the actor is alive and false otherwise.
|
|
||||||
bool alive_;
|
|
||||||
/// The object representing the state following the actor's most recently
|
/// The object representing the state following the actor's most recently
|
||||||
/// executed task. The next task to execute on the actor should be marked as
|
/// executed task. The next task to execute on the actor should be marked as
|
||||||
/// execution-dependent on this object.
|
/// execution-dependent on this object.
|
||||||
|
|
|
@ -1764,14 +1764,27 @@ std::string NodeManager::DebugString() const {
|
||||||
result << "\n" << reconstruction_policy_.DebugString();
|
result << "\n" << reconstruction_policy_.DebugString();
|
||||||
result << "\n" << task_dependency_manager_.DebugString();
|
result << "\n" << task_dependency_manager_.DebugString();
|
||||||
result << "\n" << lineage_cache_.DebugString();
|
result << "\n" << lineage_cache_.DebugString();
|
||||||
|
result << "\nActorRegistry:";
|
||||||
|
int live_actors = 0;
|
||||||
|
int dead_actors = 0;
|
||||||
|
int max_num_handles = 0;
|
||||||
|
for (auto &pair : actor_registry_) {
|
||||||
|
if (pair.second.IsAlive()) {
|
||||||
|
live_actors += 1;
|
||||||
|
} else {
|
||||||
|
dead_actors += 1;
|
||||||
|
}
|
||||||
|
if (pair.second.NumHandles() > max_num_handles) {
|
||||||
|
max_num_handles = pair.second.NumHandles();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result << "\n- num live actors: " << live_actors;
|
||||||
|
result << "\n- num dead actors: " << dead_actors;
|
||||||
|
result << "\n- max num handles: " << max_num_handles;
|
||||||
result << "\nRemoteConnections:";
|
result << "\nRemoteConnections:";
|
||||||
for (auto &pair : remote_server_connections_) {
|
for (auto &pair : remote_server_connections_) {
|
||||||
result << "\n" << pair.first.hex() << ": " << pair.second->DebugString();
|
result << "\n" << pair.first.hex() << ": " << pair.second->DebugString();
|
||||||
}
|
}
|
||||||
result << "\nActorRegistry:";
|
|
||||||
for (auto &pair : actor_registry_) {
|
|
||||||
result << "\n" << pair.first.hex() << ": " << pair.second.DebugString();
|
|
||||||
}
|
|
||||||
result << "\nDebugString() time ms: " << (current_time_ms() - now_ms);
|
result << "\nDebugString() time ms: " << (current_time_ms() - now_ms);
|
||||||
return result.str();
|
return result.str();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue