{"action":"created","issue":{"url":"https://api.github.com/repos/akinaru/speed-test-lib/issues/5","repository_url":"https://api.github.com/repos/akinaru/speed-test-lib","labels_url":"https://api.github.com/repos/akinaru/speed-test-lib/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/akinaru/speed-test-lib/issues/5/comments","events_url":"https://api.github.com/repos/akinaru/speed-test-lib/issues/5/events","html_url":"https://github.com/akinaru/speed-test-lib/issues/5","id":173001512,"number":5,"title":"Continuous sampling of UL and DL rate","user":{"login":"arianaa30","id":5509837,"avatar_url":"https://avatars.githubusercontent.com/u/5509837?v=3","gravatar_id":"","url":"https://api.github.com/users/arianaa30","html_url":"https://github.com/arianaa30","followers_url":"https://api.github.com/users/arianaa30/followers","following_url":"https://api.github.com/users/arianaa30/following{/other_user}","gists_url":"https://api.github.com/users/arianaa30/gists{/gist_id}","starred_url":"https://api.github.com/users/arianaa30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arianaa30/subscriptions","organizations_url":"https://api.github.com/users/arianaa30/orgs","repos_url":"https://api.github.com/users/arianaa30/repos","events_url":"https://api.github.com/users/arianaa30/events{/privacy}","received_events_url":"https://api.github.com/users/arianaa30/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akinaru/speed-test-lib/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/akinaru/speed-test-lib/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"akinaru","id":5183022,"avatar_url":"https://avatars.githubusercontent.com/u/5183022?v=3","gravatar_id":"","url":"https://api.github.com/users/akinaru","html_url":"https://github.com/akinaru","followers_url":"https://api.github.com/users/akinaru/followers","following_url":"https://api.github.com/users/akinaru/following{/other_user}","gists_url":"https://api.github.com/users/akinaru/gists{/gist_id}","starred_url":"https://api.github.com/users/akinaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akinaru/subscriptions","organizations_url":"https://api.github.com/users/akinaru/orgs","repos_url":"https://api.github.com/users/akinaru/repos","events_url":"https://api.github.com/users/akinaru/events{/privacy}","received_events_url":"https://api.github.com/users/akinaru/received_events","type":"User","site_admin":false},"assignees":[{"login":"akinaru","id":5183022,"avatar_url":"https://avatars.githubusercontent.com/u/5183022?v=3","gravatar_id":"","url":"https://api.github.com/users/akinaru","html_url":"https://github.com/akinaru","followers_url":"https://api.github.com/users/akinaru/followers","following_url":"https://api.github.com/users/akinaru/following{/other_user}","gists_url":"https://api.github.com/users/akinaru/gists{/gist_id}","starred_url":"https://api.github.com/users/akinaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akinaru/subscriptions","organizations_url":"https://api.github.com/users/akinaru/orgs","repos_url":"https://api.github.com/users/akinaru/repos","events_url":"https://api.github.com/users/akinaru/events{/privacy}","received_events_url":"https://api.github.com/users/akinaru/received_events","type":"User","site_admin":false}],"milestone":null,"comments":16,"created_at":"2016-08-24T16:38:24Z","updated_at":"2016-08-26T19:39:08Z","closed_at":null,"body":"Very interesting library. I want to develop a profiler Android app that every say 4 seconds gets UL and DL rates and saves as a .csv file (plus I will add some extra info such as time stamp, and others). I quickly noticed I can set time interval for DL and UL, right? Does it given me enough flexibility to do my tasks? How easy is it to do that? Any working examples?"},"comment":{"url":"https://api.github.com/repos/akinaru/speed-test-lib/issues/comments/242831649","html_url":"https://github.com/akinaru/speed-test-lib/issues/5#issuecomment-242831649","issue_url":"https://api.github.com/repos/akinaru/speed-test-lib/issues/5","id":242831649,"user":{"login":"arianaa30","id":5509837,"avatar_url":"https://avatars.githubusercontent.com/u/5509837?v=3","gravatar_id":"","url":"https://api.github.com/users/arianaa30","html_url":"https://github.com/arianaa30","followers_url":"https://api.github.com/users/arianaa30/followers","following_url":"https://api.github.com/users/arianaa30/following{/other_user}","gists_url":"https://api.github.com/users/arianaa30/gists{/gist_id}","starred_url":"https://api.github.com/users/arianaa30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arianaa30/subscriptions","organizations_url":"https://api.github.com/users/arianaa30/orgs","repos_url":"https://api.github.com/users/arianaa30/repos","events_url":"https://api.github.com/users/arianaa30/events{/privacy}","received_events_url":"https://api.github.com/users/arianaa30/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T19:39:08Z","updated_at":"2016-08-26T19:39:08Z","body":"I think putting them in two different functions (or threads) and one calling the other in its finish() is what you mean:\r\n\r\nWe start by calling `startDownload();` and it goes on...\r\n\t\r\n```\r\n\t\tvoid startDownload(){\r\n\t        speedTestSocket.startDownloadRepeat(SPEED_TEST_SERVER_HOST, SPEED_TEST_SERVER_PORT, SPEED_TEST_SERVER_URI_DL,\r\n\t                SPEED_TEST_DURATION, REPORT_INTERVAL, new\r\n\t                        IRepeatListener() {\r\n\t                            @Override\r\n\t                            public void onFinish(final SpeedTestReport report) {\r\n\t                            \tstartUpload();\r\n\t                            }\r\n\r\n\t                            @Override\r\n\t                            public void onReport(final SpeedTestReport report) {\r\n\t                            \tString result = report.getTransferRateBit()/(1024) +\" Kbps (DOWNLOAD), \";\r\n\t                            \tString timeStamp= (report.getReportTime() - report.getStartTime()) / 1000 + \"s\";\r\n\t                            \t\r\n\t                            \tresult+=timeStamp;\r\n\t                            \t\r\n\t                                Log.i(\"speed test\", \"speed test: \"+result);\r\n\t                                publishProgress(result);\r\n\t                            }\r\n\t                        });\r\n}\r\n\t\t\r\n\t\tvoid startUpload(){\r\n\t        speedTestSocket.startUploadRepeat(SPEED_TEST_SERVER_HOST, SPEED_TEST_SERVER_PORT, SPEED_TEST_SERVER_URI_UL,\r\n\t                SPEED_TEST_DURATION, REPORT_INTERVAL, FILE_SIZE, new\r\n\t                        IRepeatListener() {\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onFinish(SpeedTestReport report) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tstartDownload();\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onReport(SpeedTestReport report) {\r\n\t                            \tString result = report.getTransferRateBit()/(1024) +\" Kbps (UPLOAD), \";\r\n\t                            \tString timeStamp= (report.getReportTime() - report.getStartTime()) / 1000 + \"s\";\r\n\t                            \t\r\n\t                            \tresult+=timeStamp;\r\n\t                            \t\r\n\t                                Log.i(\"speed test\", \"speed test: \"+result);\r\n\t                                publishProgress(result);\r\n\t\t\t\t\t\t\t\t}\r\n\t        });\r\n\t\t}\r\n```"}}
{"actor":{"display_login":"arianaa30"}}