Skip to content

Commit

Permalink
[Core] Emit total lineage bytes metric (#46725)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
  • Loading branch information
jjyao authored Jul 26, 2024
1 parent 69f3218 commit f9b36da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ray/core_worker/task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,7 @@ void TaskManager::FillTaskInfo(rpc::GetCoreWorkerStatsReply *reply,

void TaskManager::RecordMetrics() {
absl::MutexLock lock(&mu_);
ray::stats::STATS_total_lineage_bytes.Record(total_lineage_footprint_bytes_);
task_counter_.FlushOnChangeCallbacks();
}

Expand Down
9 changes: 9 additions & 0 deletions src/ray/stats/metric_defs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ DEFINE_stats(
("Type", "Name"),
(),
ray::stats::COUNT);

/// Core Worker Task Manager
DEFINE_stats(
total_lineage_bytes,
"Total amount of memory used to store task specs for lineage reconstruction.",
(),
(),
ray::stats::GAUGE);

} // namespace stats

} // namespace ray
3 changes: 3 additions & 0 deletions src/ray/stats/metric_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ DECLARE_stats(gcs_actors_count);
/// Memory Manager
DECLARE_stats(memory_manager_worker_eviction_total);

/// Core Worker Task Manager
DECLARE_stats(total_lineage_bytes);

/// The below items are legacy implementation of metrics.
/// TODO(sang): Use DEFINE_stats instead.

Expand Down

0 comments on commit f9b36da

Please sign in to comment.