Skip to content

Commit

Permalink
Revert "[Metrics] Fix shared memory is not displayed properly (#34301)…
Browse files Browse the repository at this point in the history
…" (#34407)

This reverts commit 688ddf6.
  • Loading branch information
cadedaniel authored Apr 15, 2023
1 parent a333017 commit bd8905b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def max_plus_pending(max_resource, pending_resource):
legend="{{Component}}",
),
Target(
expr="sum(ray_node_mem_shared_bytes{{{global_filters}}})",
expr="node_mem_shared_bytes{{{global_filters}}}",
legend="shared_memory",
),
Target(
Expand Down
2 changes: 1 addition & 1 deletion dashboard/modules/reporter/reporter_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def _record_stats(self, stats, cluster_stats):
if shm_used:
node_mem_shared = Record(
gauge=METRICS_GAUGES["node_mem_shared_bytes"],
value=shm_used,
value=mem_total,
tags={"ip": ip},
)
records_reported.append(node_mem_shared)
Expand Down
7 changes: 1 addition & 6 deletions dashboard/modules/reporter/tests/test_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ def test_case_stats_exist():
"ray_node_mem_used" in metric_names,
"ray_node_mem_available" in metric_names,
"ray_node_mem_total" in metric_names,
"ray_node_mem_total" in metric_names,
"ray_node_mem_shared_bytes" in metric_names,
"ray_component_cpu_percentage" in metric_names,
"ray_component_rss_mb" in metric_names,
"ray_component_uss_mb" in metric_names,
"ray_node_disk_io_read" in metric_names,
Expand Down Expand Up @@ -261,10 +260,6 @@ def test_report_stats():

records = agent._record_stats(STATS_TEMPLATE, cluster_stats)
for record in records:
name = record.gauge.name
val = record.value
if name == "node_mem_shared_bytes":
assert val == STATS_TEMPLATE["shm"]
print(record.gauge.name)
print(record)
assert len(records) == 33
Expand Down

0 comments on commit bd8905b

Please sign in to comment.