{"action":"created","issue":{"url":"https://api.github.com/repos/catapult-project/catapult/issues/624","labels_url":"https://api.github.com/repos/catapult-project/catapult/issues/624/labels{/name}","comments_url":"https://api.github.com/repos/catapult-project/catapult/issues/624/comments","events_url":"https://api.github.com/repos/catapult-project/catapult/issues/624/events","html_url":"https://github.com/catapult-project/catapult/issues/624","id":98576751,"number":624,"title":"Nanoseconds support","user":{"login":"catapult-bot","id":13457154,"avatar_url":"https://avatars.githubusercontent.com/u/13457154?v=3","gravatar_id":"","url":"https://api.github.com/users/catapult-bot","html_url":"https://github.com/catapult-bot","followers_url":"https://api.github.com/users/catapult-bot/followers","following_url":"https://api.github.com/users/catapult-bot/following{/other_user}","gists_url":"https://api.github.com/users/catapult-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/catapult-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catapult-bot/subscriptions","organizations_url":"https://api.github.com/users/catapult-bot/orgs","repos_url":"https://api.github.com/users/catapult-bot/repos","events_url":"https://api.github.com/users/catapult-bot/events{/privacy}","received_events_url":"https://api.github.com/users/catapult-bot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-02T02:10:42Z","updated_at":"2015-08-02T02:11:39Z","closed_at":null,"body":"<a href=\"https://github.com/dvyukov\"><img src=\"https://avatars.githubusercontent.com/u/1095328?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [dvyukov](https://github.com/dvyukov)**\n_Tuesday Sep 30, 2014 at 13:55 GMT_\n_Originally opened as https://github.com/google/trace-viewer/issues/624_\n\n----\n\nHi,\r\n\r\nI want to use the trace viewer and it looks awesome.\r\nBut my traces have nanosecond precision. I've tried to divide the timestamps by 1000 and use fractional values, but it does not work. The viewer understands fractional values, but then the visual representation looks completely messed seemingly due to some rounding errors (it seem to assume that min duration of a slice is 1.0). Here is a reproducer:\r\n\r\n{\"traceEvents\": [\r\n        {\"name\": \"X1\", \"ph\": \"B\", \"pid\": 1, \"tid\": 1, \"ts\": 0},\r\n        {\"name\": \"X1\", \"ph\": \"E\", \"pid\": 1, \"tid\": 1, \"ts\": 1.1},\r\n        {\"name\": \"X2\", \"ph\": \"B\", \"pid\": 1, \"tid\": 1, \"ts\": 1.1},\r\n        {\"name\": \"X2\", \"ph\": \"E\", \"pid\": 1, \"tid\": 1, \"ts\": 1.3},\r\n        {\"name\": \"X3\", \"ph\": \"B\", \"pid\": 1, \"tid\": 1, \"ts\": 1.3},\r\n        {\"name\": \"X3\", \"ph\": \"E\", \"pid\": 1, \"tid\": 1, \"ts\": 1.6},\r\n        {\"name\": \"X4\", \"ph\": \"B\", \"pid\": 1, \"tid\": 1, \"ts\": 1.7},\r\n        {\"name\": \"X4\", \"ph\": \"E\", \"pid\": 1, \"tid\": 1, \"ts\": 2.1},\r\n{}]}\r\n\r\nI've also noticed that if I have several flow events starting at the same microsecond:\r\n\r\n{\"name\": \"unblock\", \"ph\": \"s\", \"pid\": 0, \"tid\": 0, \"id\": \"86\", \"ts\": 45747.68},\r\n{\"name\": \"unblock\", \"ph\": \"t\", \"pid\": 0, \"tid\": 3, \"id\": \"86\", \"ts\": 45799.224},\r\n{\"name\": \"unblock\", \"ph\": \"s\", \"pid\": 0, \"tid\": 0, \"id\": \"87\", \"ts\": 45747.989},\r\n{\"name\": \"unblock\", \"ph\": \"t\", \"pid\": 0, \"tid\": 2, \"id\": \"87\", \"ts\": 45825.085},\r\n\r\nThen, they are drawn on several rows. While I would expect them to be draw on the same row, as they start at different times.\r\n\r\nI am on revision f30622546bd34fa53e79532a9fe315f91dcd0b29.\n"},"comment":{"url":"https://api.github.com/repos/catapult-project/catapult/issues/comments/126977665","html_url":"https://github.com/catapult-project/catapult/issues/624#issuecomment-126977665","issue_url":"https://api.github.com/repos/catapult-project/catapult/issues/624","id":126977665,"user":{"login":"catapult-bot","id":13457154,"avatar_url":"https://avatars.githubusercontent.com/u/13457154?v=3","gravatar_id":"","url":"https://api.github.com/users/catapult-bot","html_url":"https://github.com/catapult-bot","followers_url":"https://api.github.com/users/catapult-bot/followers","following_url":"https://api.github.com/users/catapult-bot/following{/other_user}","gists_url":"https://api.github.com/users/catapult-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/catapult-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catapult-bot/subscriptions","organizations_url":"https://api.github.com/users/catapult-bot/orgs","repos_url":"https://api.github.com/users/catapult-bot/repos","events_url":"https://api.github.com/users/catapult-bot/events{/privacy}","received_events_url":"https://api.github.com/users/catapult-bot/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T02:11:39Z","updated_at":"2015-08-02T02:11:39Z","body":"<a href=\"https://github.com/dvyukov\"><img src=\"https://avatars.githubusercontent.com/u/1095328?v=3\" align=\"left\" width=\"48\" height=\"48\" hspace=\"10\"></img></a> **Comment by [dvyukov](https://github.com/dvyukov)**\n_Sunday Mar 15, 2015 at 11:17 GMT_\n\n----\n\n@egonelbre I've tried to test your changes. My repo is on 2014e39332889334feb13b89179c79b9e9a4c0ae (current tip). Without your changes vulcanize_trace_viewer passes. With your changes it fails as:\r\n\r\n```\r\ntrace-viewer dvyukov$ ./vulcanize_trace_viewer --config=lean\r\nyui-compressor missing. CSS minification will be skipped.\r\nTraceback (most recent call last):\r\n  File \"./vulcanize_trace_viewer\", line 12, in <module>\r\n    sys.exit(vulcanize_trace_viewer.Main(sys.argv[1:]))\r\n  File \"/Users/dvyukov/src/trace-viewer/trace_viewer/build/vulcanize_trace_viewer.py\", line 56, in Main\r\n    report_deps=options.report_deps)\r\n  File \"/Users/dvyukov/src/trace-viewer/trace_viewer/build/vulcanize_trace_viewer.py\", line 88, in WriteTraceViewer\r\n    output_html_head_and_body=output_html_head_and_body)\r\n  File \"/Users/dvyukov/src/trace-viewer/third_party/tvcm/tvcm/generate.py\", line 315, in GenerateStandaloneHTMLToFile\r\n    GenerateJS(load_sequence, minify=minify, report_sizes=report_sizes))\r\n  File \"/Users/dvyukov/src/trace-viewer/third_party/tvcm/tvcm/generate.py\", line 145, in GenerateJS\r\n    report_sizes=report_sizes)\r\n  File \"/Users/dvyukov/src/trace-viewer/third_party/tvcm/tvcm/generate.py\", line 178, in GenerateJSToFile\r\n    js = flatten_to_file.getvalue()\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/StringIO.py\", line 271, in getvalue\r\n    self.buf += ''.join(self.buflist)\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 416: ordinal not in range(128)\r\n```\n"}}