mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
[xray] Implement timeline and profiling API. (#2306)
* Add profile table and store profiling information there. * Code for dumping timeline. * Improve color scheme. * Push timeline events on driver only for raylet. * Improvements to profiling and timeline visualization * Some linting * Small fix. * Linting * Propagate node IP address through profiling events. * Fix test. * object_id.hex() should return byte string in python 2. * Include gcs.fbs in node_manager.fbs. * Remove flatbuffer definition duplication. * Decode to unicode in Python 3 and bytes in Python 2. * Minor * Submit profile events in a batch. Revert some CMake changes. * Fix * Workaround test failure. * Fix linting * Linting * Don't return anything from chrome_tracing_dump when filename is provided. * Remove some redundancy from profile table. * Linting * Move TODOs out of docstring. * Minor
This commit is contained in:
committed by
Philipp Moritz
parent
8e687cbc98
commit
b90e551b41
@@ -10,6 +10,7 @@ import time
|
||||
from ray.services import get_ip_address
|
||||
from ray.services import get_port
|
||||
from ray.services import logger
|
||||
import ray.utils
|
||||
|
||||
|
||||
class LogMonitor(object):
|
||||
@@ -70,7 +71,7 @@ class LogMonitor(object):
|
||||
if len(new_lines) > 0:
|
||||
self.log_files[log_filename] += new_lines
|
||||
redis_key = "LOGFILE:{}:{}".format(
|
||||
self.node_ip_address, log_filename.decode("ascii"))
|
||||
self.node_ip_address, ray.utils.decode(log_filename))
|
||||
self.redis_client.rpush(redis_key, *new_lines)
|
||||
|
||||
# Pass if we already failed to open the log file.
|
||||
|
||||
Reference in New Issue
Block a user