{"action":"closed","issue":{"url":"https://api.github.com/repos/sivel/speedtest-cli/issues/344","repository_url":"https://api.github.com/repos/sivel/speedtest-cli","labels_url":"https://api.github.com/repos/sivel/speedtest-cli/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/sivel/speedtest-cli/issues/344/comments","events_url":"https://api.github.com/repos/sivel/speedtest-cli/issues/344/events","html_url":"https://github.com/sivel/speedtest-cli/issues/344","id":194217419,"number":344,"title":"Improve accuracy of version 1.0","user":{"login":"skiyuki","id":5491298,"avatar_url":"https://avatars.githubusercontent.com/u/5491298?v=3","gravatar_id":"","url":"https://api.github.com/users/skiyuki","html_url":"https://github.com/skiyuki","followers_url":"https://api.github.com/users/skiyuki/followers","following_url":"https://api.github.com/users/skiyuki/following{/other_user}","gists_url":"https://api.github.com/users/skiyuki/gists{/gist_id}","starred_url":"https://api.github.com/users/skiyuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skiyuki/subscriptions","organizations_url":"https://api.github.com/users/skiyuki/orgs","repos_url":"https://api.github.com/users/skiyuki/repos","events_url":"https://api.github.com/users/skiyuki/events{/privacy}","received_events_url":"https://api.github.com/users/skiyuki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-08T00:45:02Z","updated_at":"2016-12-08T15:21:13Z","closed_at":"2016-12-08T15:21:13Z","body":"Thank you for your uploading the version 1.0 codes which make me joyful to try and modify the codes.\r\nI increased speed prediction accuracy by the following modifications.\r\n\r\n1) Increase upload chunk length\r\nself.config['upload_max'](=50) chunks are selected from chunk list generated by \r\nfor size in  [524288, 1048576, 7340032]:\r\n   for _ in range(0, 33):\r\n        sizes.append(size)\r\n \r\n(524288 * 32 + 1048576 * 18) * 8 = 285.212672 Mbits without 7340032 chunk.\r\nModify to,\r\nfor _ in range(0, 33):\r\n    for size in  [524288, 1048576, 7340032]:\r\n        sizes.append(size)\r\n((524288 + 1048576 + 7340032) * 16 + 524288 + 1048576) * 8 = 1153.4336 Mbits\r\n\r\n2) Increase timeout\r\nTimeout is fixed to self.config['length']['upload'](=10 seconds), is not changed by\r\n --timeout command options. Download timeout occurs when speed is lower than 3275/10=327Mbits/second, lowering speed decreases download chunks and may lower accuracy.\r\n\r\nSet self.config['length']['upload'] to the lowest speed of target systems.\r\n\r\n3) Simplify join()\r\nIt may be a little improvements, however easy to understand.\r\n\r\n3.1) No thread.join(timeout=0.1)\r\nThread flows are controlled by the following lines:\r\nthread = q.get(True)\r\nwhile thread.isAlive():\r\n   thread.join(timeout=0.1)\r\nwhitch can be replaced　by\r\nthread = q.get(True)\r\nthread.join()\r\n\r\nOverheads of q.get(), counted as the longest thread run time divided by 0.1, may be removed.\r\n\r\n3.2) No pro_thread.join()\r\nProducer and consumer threads are synchronized by a Queue.\r\nThe following lines \r\nwhile prod_thread.isAlive():\r\n    prod_thread.join(timeout=0.1)\r\nwhile cons_thread.isAlive():\r\n    cons_thread.join(timeout=0.1)\r\nare replaced by \r\ncons_thread.join()\r\n\r\nHow about the above modifications?\r\n"}}
{"actor":{"display_login":"sivel"}}