mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
Clean up actor metrics (#10317)
This commit is contained in:
@@ -37,7 +37,6 @@ struct ActorStats {
|
||||
int live_actors = 0;
|
||||
int dead_actors = 0;
|
||||
int restarting_actors = 0;
|
||||
int max_num_handles = 0;
|
||||
};
|
||||
|
||||
/// A helper function to return the statistical data of actors in this node manager.
|
||||
@@ -52,9 +51,6 @@ ActorStats GetActorStatisticalData(
|
||||
} else {
|
||||
item.dead_actors += 1;
|
||||
}
|
||||
if (pair.second.NumHandles() > item.max_num_handles) {
|
||||
item.max_num_handles = pair.second.NumHandles();
|
||||
}
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@@ -3026,7 +3022,6 @@ std::string NodeManager::DebugString() const {
|
||||
result << "\n- num live actors: " << statistical_data.live_actors;
|
||||
result << "\n- num restarting actors: " << statistical_data.restarting_actors;
|
||||
result << "\n- num dead actors: " << statistical_data.dead_actors;
|
||||
result << "\n- max num handles: " << statistical_data.max_num_handles;
|
||||
|
||||
result << "\nRemote node manager clients: ";
|
||||
for (const auto &entry : remote_node_manager_clients_) {
|
||||
@@ -3410,18 +3405,12 @@ void NodeManager::RecordMetrics() {
|
||||
object_manager_.RecordMetrics();
|
||||
worker_pool_.RecordMetrics();
|
||||
local_queues_.RecordMetrics();
|
||||
reconstruction_policy_.RecordMetrics();
|
||||
task_dependency_manager_.RecordMetrics();
|
||||
|
||||
auto statistical_data = GetActorStatisticalData(actor_registry_);
|
||||
stats::ActorStats().Record(statistical_data.live_actors,
|
||||
{{stats::ValueTypeKey, "live_actors"}});
|
||||
stats::ActorStats().Record(statistical_data.restarting_actors,
|
||||
{{stats::ValueTypeKey, "restarting_actors"}});
|
||||
stats::ActorStats().Record(statistical_data.dead_actors,
|
||||
{{stats::ValueTypeKey, "dead_actors"}});
|
||||
stats::ActorStats().Record(statistical_data.max_num_handles,
|
||||
{{stats::ValueTypeKey, "max_num_handles"}});
|
||||
stats::LiveActors().Record(statistical_data.live_actors);
|
||||
stats::RestartingActors().Record(statistical_data.restarting_actors);
|
||||
stats::DeadActors().Record(statistical_data.dead_actors);
|
||||
}
|
||||
|
||||
} // namespace raylet
|
||||
|
||||
@@ -253,11 +253,6 @@ std::string ReconstructionPolicy::DebugString() const {
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void ReconstructionPolicy::RecordMetrics() const {
|
||||
stats::ReconstructionPolicyStats().Record(
|
||||
listening_tasks_.size(), {{stats::ValueTypeKey, "num_reconstructing_tasks"}});
|
||||
}
|
||||
|
||||
} // namespace raylet
|
||||
|
||||
} // end namespace ray
|
||||
|
||||
@@ -89,9 +89,6 @@ class ReconstructionPolicy : public ReconstructionPolicyInterface {
|
||||
/// \return string.
|
||||
std::string DebugString() const;
|
||||
|
||||
/// Record metrics.
|
||||
void RecordMetrics() const;
|
||||
|
||||
private:
|
||||
struct ReconstructionTask {
|
||||
ReconstructionTask(boost::asio::io_service &io_service)
|
||||
|
||||
@@ -54,8 +54,12 @@ static Gauge LocalTotalResource("local_total_resource",
|
||||
"The total resources on this node.", "pcs",
|
||||
{ResourceNameKey});
|
||||
|
||||
static Gauge ActorStats("actor_stats", "Stat metrics of the actors in raylet.", "pcs",
|
||||
{ValueTypeKey});
|
||||
static Gauge LiveActors("live_actors", "Number of live actors.", "actors");
|
||||
|
||||
static Gauge RestartingActors("restarting_actors", "Number of restarting actors.",
|
||||
"actors");
|
||||
|
||||
static Gauge DeadActors("dead_actors", "Number of dead actors.", "actors");
|
||||
|
||||
static Gauge ObjectManagerStats("object_manager_stats",
|
||||
"Stat the metric values of object in raylet", "pcs",
|
||||
@@ -69,10 +73,6 @@ static Gauge SchedulingQueueStats("scheduling_queue_stats",
|
||||
"Stats the metric values of scheduling queue.", "pcs",
|
||||
{ValueTypeKey});
|
||||
|
||||
static Gauge ReconstructionPolicyStats(
|
||||
"reconstruction_policy_stats", "Stats the metric values of reconstruction policy.",
|
||||
"pcs", {ValueTypeKey});
|
||||
|
||||
static Gauge ConnectionPoolStats("connection_pool_stats",
|
||||
"Stats the connection pool metrics.", "pcs",
|
||||
{ValueTypeKey});
|
||||
|
||||
Reference in New Issue
Block a user