{"action":"opened","number":7,"pull_request":{"url":"https://api.github.com/repos/dizballanze/do-latency/pulls/7","id":183538920,"html_url":"https://github.com/dizballanze/do-latency/pull/7","diff_url":"https://github.com/dizballanze/do-latency/pull/7.diff","patch_url":"https://github.com/dizballanze/do-latency/pull/7.patch","issue_url":"https://api.github.com/repos/dizballanze/do-latency/issues/7","number":7,"state":"open","locked":false,"title":"Added sfo2 host, download exception handling, messages compatibility with progressbar","user":{"login":"itnelo","id":2988715,"avatar_url":"https://avatars2.githubusercontent.com/u/2988715?v=4","gravatar_id":"","url":"https://api.github.com/users/itnelo","html_url":"https://github.com/itnelo","followers_url":"https://api.github.com/users/itnelo/followers","following_url":"https://api.github.com/users/itnelo/following{/other_user}","gists_url":"https://api.github.com/users/itnelo/gists{/gist_id}","starred_url":"https://api.github.com/users/itnelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itnelo/subscriptions","organizations_url":"https://api.github.com/users/itnelo/orgs","repos_url":"https://api.github.com/users/itnelo/repos","events_url":"https://api.github.com/users/itnelo/events{/privacy}","received_events_url":"https://api.github.com/users/itnelo/received_events","type":"User","site_admin":false},"body":"Added http://speedtest-sfo2.digitalocean.com\r\nAdded exception handling for urlopen due to some cases with unreachable networks\r\nHook improved to have compatibility with custom messages during progress calculation\r\n\r\n```\r\nppetrov@dev: ~ $ sudo do-latency\r\n        Latency testing (ams2): |██████████████████████████████████████████████████████████████████████████████████|100.00%        \r\n Download speed testing (sfo1): |███████▏                                                                          |8.73%Traceback (most recent call last):\r\n  File \"/usr/bin/do-latency\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/home/ppetrov/.local/lib/python2.7/site-packages/do_latency/do_latency.py\", line 58, in main\r\n    start_test(**args.__dict__)\r\n  File \"/home/ppetrov/.local/lib/python2.7/site-packages/do_latency/do_latency.py\", line 43, in start_test\r\n    results[region].append(do_download(url, lambda progress: pbar.update(progress)))\r\n  File \"/home/ppetrov/.local/lib/python2.7/site-packages/do_latency/download.py\", line 16, in do_download\r\n    http_handler = urllib2.urlopen(url)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 154, in urlopen\r\n    return opener.open(url, data, timeout)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 429, in open\r\n    response = self._open(req, data)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 447, in _open\r\n    '_open', req)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 407, in _call_chain\r\n    result = func(*args)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 1228, in http_open\r\n    return self.do_open(httplib.HTTPConnection, req)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 1198, in do_open\r\n    raise URLError(err)\r\nurllib2.URLError: <urlopen error [Errno 101] Network is unreachable>\r\n```\r\n\r\nFinally, after this fixes, I've got it:\r\n\r\n```\r\nppetrov@dev: ~ $ sudo do-latency\r\n[sudo] password for ppetrov: \r\n        Latency testing (ams2): |████████████████████████████████████████████████████████████████████████████████████████████████████████████████|100.00%\r\n                                                                                                                                                         \r\n'http://speedtest-sfo2.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n                                                                                                                                                         \r\n'http://speedtest-fra1.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n                                                                                                                                                         \r\n'http://speedtest-nyc3.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n                                                                                                                                                         \r\n'http://speedtest-nyc1.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n                                                                                                                                                         \r\n'http://speedtest-sgp1.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n                                                                                                                                                         \r\n'http://speedtest-blr1.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n                                                                                                                                                         \r\n'http://speedtest-tor1.digitalocean.com/10mb.test': [Errno 101] Network is unreachable\r\n Download speed testing (ams2): |██████████████████████████████████████████████▏                                                                  |40.83%\r\n\r\n+--------+--------------+-----------------------+\r\n| Region | Latency (ms) | Download speed (mbps) |\r\n+--------+--------------+-----------------------+\r\n| sfo2   | 0.000        | 00.000                |\r\n| sgp1   | 0.000        | 00.000                |\r\n| blr1   | 0.000        | 00.000                |\r\n| tor1   | 0.000        | 00.000                |\r\n| fra1   | 0.000        | 00.000                |\r\n| nyc3   | 0.000        | 00.000                |\r\n| nyc1   | 0.000        | 00.000                |\r\n| ams3   | 0.049        | 75.286                |\r\n| ams2   | 0.053        | 67.467                |\r\n| lon1   | 0.064        | 41.162                |\r\n| nyc2   | 0.127        | 35.149                |\r\n| sfo1   | 0.196        | 28.748                |\r\n+--------+--------------+-----------------------+\r\n```\r\n\r\nSo, my choice will be i think:\r\n\r\n`ams3   | 0.049        | 75.286`\r\n\r\nGoodbye)","created_at":"2018-04-23T19:50:25Z","updated_at":"2018-04-23T19:50:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dizballanze/do-latency/pulls/7/commits","review_comments_url":"https://api.github.com/repos/dizballanze/do-latency/pulls/7/comments","review_comment_url":"https://api.github.com/repos/dizballanze/do-latency/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dizballanze/do-latency/issues/7/comments","statuses_url":"https://api.github.com/repos/dizballanze/do-latency/statuses/22324b21a053e06116b0efe9c5ad9b9bf8f27ab2","head":{"label":"itnelo:download-exception-handling","ref":"download-exception-handling","sha":"22324b21a053e06116b0efe9c5ad9b9bf8f27ab2","user":{"login":"itnelo","id":2988715,"avatar_url":"https://avatars2.githubusercontent.com/u/2988715?v=4","gravatar_id":"","url":"https://api.github.com/users/itnelo","html_url":"https://github.com/itnelo","followers_url":"https://api.github.com/users/itnelo/followers","following_url":"https://api.github.com/users/itnelo/following{/other_user}","gists_url":"https://api.github.com/users/itnelo/gists{/gist_id}","starred_url":"https://api.github.com/users/itnelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itnelo/subscriptions","organizations_url":"https://api.github.com/users/itnelo/orgs","repos_url":"https://api.github.com/users/itnelo/repos","events_url":"https://api.github.com/users/itnelo/events{/privacy}","received_events_url":"https://api.github.com/users/itnelo/received_events","type":"User","site_admin":false},"repo":{"id":130714340,"name":"do-latency","full_name":"itnelo/do-latency","owner":{"login":"itnelo","id":2988715,"avatar_url":"https://avatars2.githubusercontent.com/u/2988715?v=4","gravatar_id":"","url":"https://api.github.com/users/itnelo","html_url":"https://github.com/itnelo","followers_url":"https://api.github.com/users/itnelo/followers","following_url":"https://api.github.com/users/itnelo/following{/other_user}","gists_url":"https://api.github.com/users/itnelo/gists{/gist_id}","starred_url":"https://api.github.com/users/itnelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itnelo/subscriptions","organizations_url":"https://api.github.com/users/itnelo/orgs","repos_url":"https://api.github.com/users/itnelo/repos","events_url":"https://api.github.com/users/itnelo/events{/privacy}","received_events_url":"https://api.github.com/users/itnelo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/itnelo/do-latency","description":"🐳 Digital Ocean regions latency checker","fork":true,"url":"https://api.github.com/repos/itnelo/do-latency","forks_url":"https://api.github.com/repos/itnelo/do-latency/forks","keys_url":"https://api.github.com/repos/itnelo/do-latency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itnelo/do-latency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itnelo/do-latency/teams","hooks_url":"https://api.github.com/repos/itnelo/do-latency/hooks","issue_events_url":"https://api.github.com/repos/itnelo/do-latency/issues/events{/number}","events_url":"https://api.github.com/repos/itnelo/do-latency/events","assignees_url":"https://api.github.com/repos/itnelo/do-latency/assignees{/user}","branches_url":"https://api.github.com/repos/itnelo/do-latency/branches{/branch}","tags_url":"https://api.github.com/repos/itnelo/do-latency/tags","blobs_url":"https://api.github.com/repos/itnelo/do-latency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itnelo/do-latency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itnelo/do-latency/git/refs{/sha}","trees_url":"https://api.github.com/repos/itnelo/do-latency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itnelo/do-latency/statuses/{sha}","languages_url":"https://api.github.com/repos/itnelo/do-latency/languages","stargazers_url":"https://api.github.com/repos/itnelo/do-latency/stargazers","contributors_url":"https://api.github.com/repos/itnelo/do-latency/contributors","subscribers_url":"https://api.github.com/repos/itnelo/do-latency/subscribers","subscription_url":"https://api.github.com/repos/itnelo/do-latency/subscription","commits_url":"https://api.github.com/repos/itnelo/do-latency/commits{/sha}","git_commits_url":"https://api.github.com/repos/itnelo/do-latency/git/commits{/sha}","comments_url":"https://api.github.com/repos/itnelo/do-latency/comments{/number}","issue_comment_url":"https://api.github.com/repos/itnelo/do-latency/issues/comments{/number}","contents_url":"https://api.github.com/repos/itnelo/do-latency/contents/{+path}","compare_url":"https://api.github.com/repos/itnelo/do-latency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itnelo/do-latency/merges","archive_url":"https://api.github.com/repos/itnelo/do-latency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itnelo/do-latency/downloads","issues_url":"https://api.github.com/repos/itnelo/do-latency/issues{/number}","pulls_url":"https://api.github.com/repos/itnelo/do-latency/pulls{/number}","milestones_url":"https://api.github.com/repos/itnelo/do-latency/milestones{/number}","notifications_url":"https://api.github.com/repos/itnelo/do-latency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itnelo/do-latency/labels{/name}","releases_url":"https://api.github.com/repos/itnelo/do-latency/releases{/id}","deployments_url":"https://api.github.com/repos/itnelo/do-latency/deployments","created_at":"2018-04-23T15:01:30Z","updated_at":"2018-04-23T19:40:00Z","pushed_at":"2018-04-23T19:42:47Z","git_url":"git://github.com/itnelo/do-latency.git","ssh_url":"git@github.com:itnelo/do-latency.git","clone_url":"https://github.com/itnelo/do-latency.git","svn_url":"https://github.com/itnelo/do-latency","homepage":"","size":824,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dizballanze:master","ref":"master","sha":"0439184b15c4d4323cbd6bfb84a7c6116e945a98","user":{"login":"dizballanze","id":952028,"avatar_url":"https://avatars1.githubusercontent.com/u/952028?v=4","gravatar_id":"","url":"https://api.github.com/users/dizballanze","html_url":"https://github.com/dizballanze","followers_url":"https://api.github.com/users/dizballanze/followers","following_url":"https://api.github.com/users/dizballanze/following{/other_user}","gists_url":"https://api.github.com/users/dizballanze/gists{/gist_id}","starred_url":"https://api.github.com/users/dizballanze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dizballanze/subscriptions","organizations_url":"https://api.github.com/users/dizballanze/orgs","repos_url":"https://api.github.com/users/dizballanze/repos","events_url":"https://api.github.com/users/dizballanze/events{/privacy}","received_events_url":"https://api.github.com/users/dizballanze/received_events","type":"User","site_admin":false},"repo":{"id":52028299,"name":"do-latency","full_name":"dizballanze/do-latency","owner":{"login":"dizballanze","id":952028,"avatar_url":"https://avatars1.githubusercontent.com/u/952028?v=4","gravatar_id":"","url":"https://api.github.com/users/dizballanze","html_url":"https://github.com/dizballanze","followers_url":"https://api.github.com/users/dizballanze/followers","following_url":"https://api.github.com/users/dizballanze/following{/other_user}","gists_url":"https://api.github.com/users/dizballanze/gists{/gist_id}","starred_url":"https://api.github.com/users/dizballanze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dizballanze/subscriptions","organizations_url":"https://api.github.com/users/dizballanze/orgs","repos_url":"https://api.github.com/users/dizballanze/repos","events_url":"https://api.github.com/users/dizballanze/events{/privacy}","received_events_url":"https://api.github.com/users/dizballanze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dizballanze/do-latency","description":"🐳 Digital Ocean regions latency checker","fork":false,"url":"https://api.github.com/repos/dizballanze/do-latency","forks_url":"https://api.github.com/repos/dizballanze/do-latency/forks","keys_url":"https://api.github.com/repos/dizballanze/do-latency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dizballanze/do-latency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dizballanze/do-latency/teams","hooks_url":"https://api.github.com/repos/dizballanze/do-latency/hooks","issue_events_url":"https://api.github.com/repos/dizballanze/do-latency/issues/events{/number}","events_url":"https://api.github.com/repos/dizballanze/do-latency/events","assignees_url":"https://api.github.com/repos/dizballanze/do-latency/assignees{/user}","branches_url":"https://api.github.com/repos/dizballanze/do-latency/branches{/branch}","tags_url":"https://api.github.com/repos/dizballanze/do-latency/tags","blobs_url":"https://api.github.com/repos/dizballanze/do-latency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dizballanze/do-latency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dizballanze/do-latency/git/refs{/sha}","trees_url":"https://api.github.com/repos/dizballanze/do-latency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dizballanze/do-latency/statuses/{sha}","languages_url":"https://api.github.com/repos/dizballanze/do-latency/languages","stargazers_url":"https://api.github.com/repos/dizballanze/do-latency/stargazers","contributors_url":"https://api.github.com/repos/dizballanze/do-latency/contributors","subscribers_url":"https://api.github.com/repos/dizballanze/do-latency/subscribers","subscription_url":"https://api.github.com/repos/dizballanze/do-latency/subscription","commits_url":"https://api.github.com/repos/dizballanze/do-latency/commits{/sha}","git_commits_url":"https://api.github.com/repos/dizballanze/do-latency/git/commits{/sha}","comments_url":"https://api.github.com/repos/dizballanze/do-latency/comments{/number}","issue_comment_url":"https://api.github.com/repos/dizballanze/do-latency/issues/comments{/number}","contents_url":"https://api.github.com/repos/dizballanze/do-latency/contents/{+path}","compare_url":"https://api.github.com/repos/dizballanze/do-latency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dizballanze/do-latency/merges","archive_url":"https://api.github.com/repos/dizballanze/do-latency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dizballanze/do-latency/downloads","issues_url":"https://api.github.com/repos/dizballanze/do-latency/issues{/number}","pulls_url":"https://api.github.com/repos/dizballanze/do-latency/pulls{/number}","milestones_url":"https://api.github.com/repos/dizballanze/do-latency/milestones{/number}","notifications_url":"https://api.github.com/repos/dizballanze/do-latency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dizballanze/do-latency/labels{/name}","releases_url":"https://api.github.com/repos/dizballanze/do-latency/releases{/id}","deployments_url":"https://api.github.com/repos/dizballanze/do-latency/deployments","created_at":"2016-02-18T18:19:23Z","updated_at":"2018-04-23T16:00:16Z","pushed_at":"2018-04-23T16:00:15Z","git_url":"git://github.com/dizballanze/do-latency.git","ssh_url":"git@github.com:dizballanze/do-latency.git","clone_url":"https://github.com/dizballanze/do-latency.git","svn_url":"https://github.com/dizballanze/do-latency","homepage":"","size":821,"stargazers_count":99,"watchers_count":99,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":7,"open_issues":1,"watchers":99,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dizballanze/do-latency/pulls/7"},"html":{"href":"https://github.com/dizballanze/do-latency/pull/7"},"issue":{"href":"https://api.github.com/repos/dizballanze/do-latency/issues/7"},"comments":{"href":"https://api.github.com/repos/dizballanze/do-latency/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/dizballanze/do-latency/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/dizballanze/do-latency/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dizballanze/do-latency/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/dizballanze/do-latency/statuses/22324b21a053e06116b0efe9c5ad9b9bf8f27ab2"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":6,"additions":20,"deletions":4,"changed_files":3}}
{"actor":{"display_login":"itnelo"}}