MCPcopy Index your code
hub / github.com/ray-project/ray / timeline

Function timeline

python/ray/scripts/scripts.py:2264–2275  ·  view source on GitHub ↗

Take a Chrome tracing timeline for a Ray cluster.

(address)

Source from the content-addressed store, hash-verified

2262 help="Override the Ray address to connect to.",
2263)
2264def timeline(address):
2265 """Take a Chrome tracing timeline for a Ray cluster."""
2266 address = services.canonicalize_bootstrap_address_or_die(address)
2267 logger.info(f"Connecting to Ray instance at {address}.")
2268 ray.init(address=address)
2269 time = datetime.today().strftime("%Y-%m-%d_%H-%M-%S")
2270 filename = os.path.join(
2271 ray.get_runtime_context().get_temp_dir(), f"ray-timeline-{time}.json"
2272 )
2273 ray.timeline(filename=filename)
2274 logger.info(f"Trace file written to {filename} in the ray temp directory.")
2275 logger.info("You can open this with chrome://tracing in the Chrome browser.")
2276
2277
2278@cli.command()

Callers

nothing calls this directly

Calls 7

strftimeMethod · 0.80
get_temp_dirMethod · 0.80
get_runtime_contextMethod · 0.80
timelineMethod · 0.80
infoMethod · 0.45
initMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…