mirror of
https://github.com/wassname/ray.git
synced 2026-08-09 12:20:09 +08:00
[Dashboard] Add profiling button to logical view (#6901)
This commit is contained in:
committed by
Philipp Moritz
parent
446cbdf2e0
commit
33423627ca
@@ -190,21 +190,23 @@ def test_raylet_info_endpoint(shutdown_only):
|
||||
"node_id": ray.nodes()[0]["NodeID"],
|
||||
"pid": actor_pid,
|
||||
"duration": 5
|
||||
}).json()
|
||||
}).json()["result"]
|
||||
start_time = time.time()
|
||||
while True:
|
||||
time.sleep(1)
|
||||
try:
|
||||
profiling_info = requests.get(
|
||||
webui_url + "/api/check_profiling_status",
|
||||
params={
|
||||
"profiling_id": profiling_id,
|
||||
}).json()
|
||||
assert profiling_info["status"] in ("finished", "pending", "error")
|
||||
# Sometimes some startup time is required
|
||||
if time.time() - start_time > 30:
|
||||
raise RayTestTimeoutException(
|
||||
"Timed out while collecting profiling stats.")
|
||||
profiling_info = requests.get(
|
||||
webui_url + "/api/check_profiling_status",
|
||||
params={
|
||||
"profiling_id": profiling_id,
|
||||
}).json()
|
||||
status = profiling_info["result"]["status"]
|
||||
assert status in ("finished", "pending", "error")
|
||||
if status in ("finished", "error"):
|
||||
break
|
||||
except AssertionError:
|
||||
if time.time() - start_time + 10:
|
||||
raise Exception("Timed out while collecting profiling stats.")
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def test_profiling_info_endpoint(shutdown_only):
|
||||
|
||||
Reference in New Issue
Block a user