{"action":"created","issue":{"url":"https://api.github.com/repos/ray-project/ray/issues/2306","repository_url":"https://api.github.com/repos/ray-project/ray","labels_url":"https://api.github.com/repos/ray-project/ray/issues/2306/labels{/name}","comments_url":"https://api.github.com/repos/ray-project/ray/issues/2306/comments","events_url":"https://api.github.com/repos/ray-project/ray/issues/2306/events","html_url":"https://github.com/ray-project/ray/pull/2306","id":336023349,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NTc2NTMx","number":2306,"title":"[xray] Implement timeline and profiling API.","user":{"login":"robertnishihara","id":249517,"node_id":"MDQ6VXNlcjI0OTUxNw==","avatar_url":"https://avatars3.githubusercontent.com/u/249517?v=4","gravatar_id":"","url":"https://api.github.com/users/robertnishihara","html_url":"https://github.com/robertnishihara","followers_url":"https://api.github.com/users/robertnishihara/followers","following_url":"https://api.github.com/users/robertnishihara/following{/other_user}","gists_url":"https://api.github.com/users/robertnishihara/gists{/gist_id}","starred_url":"https://api.github.com/users/robertnishihara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertnishihara/subscriptions","organizations_url":"https://api.github.com/users/robertnishihara/orgs","repos_url":"https://api.github.com/users/robertnishihara/repos","events_url":"https://api.github.com/users/robertnishihara/events{/privacy}","received_events_url":"https://api.github.com/users/robertnishihara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-26T23:12:39Z","updated_at":"2018-06-27T09:33:50Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ray-project/ray/pulls/2306","html_url":"https://github.com/ray-project/ray/pull/2306","diff_url":"https://github.com/ray-project/ray/pull/2306.diff","patch_url":"https://github.com/ray-project/ray/pull/2306.patch"},"body":"This PR adds more detailed profiling information to the timeline for xray and allows you to view the timeline visualization for xray. It also improves the profiling API (for xray).\r\n\r\nExample usage. To get a json dump of the profiling information that can be loaded in chrome://tracing, simply do\r\n\r\n```python\r\n# Optionally pass in filename= to specify a file to write to.\r\nray.global_state.chrome_tracing_dump()\r\n```\r\n\r\nThe dump will include profiling information for tasks (including the prior breakdown into deserializing arguments, executing the function, getting the results) as well as `ray.put`, `ray.get`, `ray.wait`, task submission, and various other little things. Profiling information will also be included from the driver, and this PR allows for the possibility of creating profiling events from any process that has a GCS client.\r\n\r\nTo add a custom span to the timeline, simply do\r\n\r\n```python\r\nwith ray.profile('event name'):\r\n    # Do something.\r\n```\r\n\r\nThen this will appear in the timeline. This can be done within a task or on the driver. An example timeline is attached.\r\n\r\n<img width=\"1384\" alt=\"screen shot 2018-06-26 at 1 17 47 pm\" src=\"https://user-images.githubusercontent.com/249517/41944419-64f0c0ca-7943-11e8-9f59-888e8fe7508f.png\">\r\n\r\n**Not implemented in this PR**\r\n- Timeline integration with web UI.\r\n\r\n**TODO in this PR maybe:**\r\n- [ ] Documentation of how to use the timeline/profiling tools.\r\n- [ ] Option for opening timeline in browser automatically.\r\n- [ ] Include task spec info in timeline (does this actually matter?).\r\n- [ ] Cleanups\r\n    - [ ] Remove duplicate `ProfileTableData` flatbuffer definition.\r\n    - [x] Remove unused `AddProfileEvent` method.\r\n- [x] Include node IP address correctly in timeline!\r\n- [ ] Double check that the timeline still works in legacy Ray.\r\n\r\ncc @alanamarzoev"},"comment":{"url":"https://api.github.com/repos/ray-project/ray/issues/comments/400607909","html_url":"https://github.com/ray-project/ray/pull/2306#issuecomment-400607909","issue_url":"https://api.github.com/repos/ray-project/ray/issues/2306","id":400607909,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDYwNzkwOQ==","user":{"login":"AmplabJenkins","id":4031291,"node_id":"MDQ6VXNlcjQwMzEyOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2018-06-27T09:33:50Z","updated_at":"2018-06-27T09:33:50Z","author_association":"COLLABORATOR","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/6317/\nTest PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}