[webui] Scalability fixes for the task timeline and visualizations (#935)

* fixes

* comments

* fix test

* Update ui.py

* upd

* Fix linting.
This commit is contained in:
Eric Liang
2017-09-10 15:47:44 -07:00
committed by Robert Nishihara
parent f3c1248d98
commit d8aa826e63
3 changed files with 109 additions and 87 deletions
+6 -5
View File
@@ -1661,10 +1661,10 @@ class GlobalStateAPI(unittest.TestCase):
# Make sure the event log has the correct number of events.
start_time = time.time()
while time.time() - start_time < 10:
profiles = ray.global_state.task_profiles(start=0, end=time.time())
limited_profiles = ray.global_state.task_profiles(start=0,
end=time.time(),
num_tasks=1)
profiles = ray.global_state.task_profiles(
100, start=0, end=time.time())
limited_profiles = ray.global_state.task_profiles(1, start=0,
end=time.time())
if len(profiles) == num_calls and len(limited_profiles) == 1:
break
time.sleep(0.1)
@@ -1729,7 +1729,8 @@ class GlobalStateAPI(unittest.TestCase):
ray.get([actor.method.remote() for actor in actors])
path = os.path.join("/tmp/ray_test_trace")
task_info = ray.global_state.task_profiles(start=0, end=time.time())
task_info = ray.global_state.task_profiles(
100, start=0, end=time.time())
ray.global_state.dump_catapult_trace(path, task_info)
# TODO(rkn): This test is not perfect because it does not verify that