mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 05:16:30 +08:00
[Stats] Metrics Export User Interface Part 1 (#9913)
* Metrics export port expose done. * Support exposing metrics port + metrics agent service discovery through ray.nodes() * Formatting. * Added a doc. * Linting. * Change the location of metrics agent port. * Addressed code review. * Addressed code review.
This commit is contained in:
@@ -1066,6 +1066,7 @@ def start_log_monitor(redis_address,
|
||||
|
||||
def start_reporter(redis_address,
|
||||
port,
|
||||
metrics_export_port,
|
||||
stdout_file=None,
|
||||
stderr_file=None,
|
||||
redis_password=None,
|
||||
@@ -1075,6 +1076,7 @@ def start_reporter(redis_address,
|
||||
Args:
|
||||
redis_address (str): The address of the Redis instance.
|
||||
port(int): The port to bind the reporter process.
|
||||
metrics_export_port(int): The port at which metrics are exposed to.
|
||||
stdout_file: A file handle opened for writing to redirect stdout to. If
|
||||
no redirection should happen, then this should be None.
|
||||
stderr_file: A file handle opened for writing to redirect stderr to. If
|
||||
@@ -1088,7 +1090,8 @@ def start_reporter(redis_address,
|
||||
os.path.dirname(os.path.abspath(__file__)), "reporter.py")
|
||||
command = [
|
||||
sys.executable, "-u", reporter_filepath,
|
||||
"--redis-address={}".format(redis_address), "--port={}".format(port)
|
||||
"--redis-address={}".format(redis_address), "--port={}".format(port),
|
||||
"--metrics-export-port={}".format(metrics_export_port)
|
||||
]
|
||||
if redis_password:
|
||||
command += ["--redis-password", redis_password]
|
||||
@@ -1259,6 +1262,7 @@ def start_raylet(redis_address,
|
||||
object_manager_port=None,
|
||||
redis_password=None,
|
||||
metrics_agent_port=None,
|
||||
metrics_export_port=None,
|
||||
use_valgrind=False,
|
||||
use_profiler=False,
|
||||
stdout_file=None,
|
||||
@@ -1296,6 +1300,7 @@ def start_raylet(redis_address,
|
||||
on. If set, min_worker_port must also be set.
|
||||
redis_password: The password to use when connecting to Redis.
|
||||
metrics_agent_port(int): The port where metrics agent is bound to.
|
||||
metrics_export_port(int): The port at which metrics are exposed to.
|
||||
use_valgrind (bool): True if the raylet should be started inside
|
||||
of valgrind. If this is True, use_profiler must be False.
|
||||
use_profiler (bool): True if the raylet should be started inside
|
||||
@@ -1403,6 +1408,7 @@ def start_raylet(redis_address,
|
||||
"--temp_dir={}".format(temp_dir),
|
||||
"--session_dir={}".format(session_dir),
|
||||
"--metrics-agent-port={}".format(metrics_agent_port),
|
||||
"--metrics_export_port={}".format(metrics_export_port),
|
||||
]
|
||||
if start_initial_python_workers_for_first_job:
|
||||
command.append("--num_initial_python_workers_for_first_job={}".format(
|
||||
|
||||
Reference in New Issue
Block a user