{"action":"created","comment":{"url":"https://api.github.com/repos/softwaremill/mqperf/pulls/comments/93905784","pull_request_review_id":14437332,"id":93905784,"diff_hunk":"@@ -31,36 +37,49 @@ class ReceiverRunnable(\n     mq: Mq,\n     reportResults: ReportResults,\n     receiveMsgBatchSize: Int\n-) extends Runnable {\n+) extends Runnable with StrictLogging {\n \n-  override def run(): Unit = {\n-    val mqReceiver = mq.createReceiver()\n+  val timeout = 60.seconds\n+  val timeoutNanos = timeout.toNanos\n \n-    val start = System.currentTimeMillis()\n-    var lastReceived = System.currentTimeMillis()\n-    var totalReceived = 0\n+  val metricRegistry = new MetricRegistry()\n+  val msgTimer = metricRegistry.timer(\"kafka-receiver-messages-timer\")\n+  val histogram = metricRegistry.histogram(\"kafka-receiver-messages-histogram\")","path":"src/main/scala/com/softwaremill/mqperf/Receiver.scala","position":38,"original_position":38,"commit_id":"255759b5f85ec92cd940de0eaace29a143a94392","original_commit_id":"255759b5f85ec92cd940de0eaace29a143a94392","user":{"login":"kciesielski","id":1413553,"avatar_url":"https://avatars.githubusercontent.com/u/1413553?v=3","gravatar_id":"","url":"https://api.github.com/users/kciesielski","html_url":"https://github.com/kciesielski","followers_url":"https://api.github.com/users/kciesielski/followers","following_url":"https://api.github.com/users/kciesielski/following{/other_user}","gists_url":"https://api.github.com/users/kciesielski/gists{/gist_id}","starred_url":"https://api.github.com/users/kciesielski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kciesielski/subscriptions","organizations_url":"https://api.github.com/users/kciesielski/orgs","repos_url":"https://api.github.com/users/kciesielski/repos","events_url":"https://api.github.com/users/kciesielski/events{/privacy}","received_events_url":"https://api.github.com/users/kciesielski/received_events","type":"User","site_admin":false},"body":"Of course.","created_at":"2016-12-27T08:07:41Z","updated_at":"2016-12-27T08:07:41Z","html_url":"https://github.com/softwaremill/mqperf/pull/11#discussion_r93905784","pull_request_url":"https://api.github.com/repos/softwaremill/mqperf/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/softwaremill/mqperf/pulls/comments/93905784"},"html":{"href":"https://github.com/softwaremill/mqperf/pull/11#discussion_r93905784"},"pull_request":{"href":"https://api.github.com/repos/softwaremill/mqperf/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/softwaremill/mqperf/pulls/11","id":99242716,"html_url":"https://github.com/softwaremill/mqperf/pull/11","diff_url":"https://github.com/softwaremill/mqperf/pull/11.diff","patch_url":"https://github.com/softwaremill/mqperf/pull/11.patch","issue_url":"https://api.github.com/repos/softwaremill/mqperf/issues/11","number":11,"state":"closed","locked":false,"title":"Initial metrics","user":{"login":"kciesielski","id":1413553,"avatar_url":"https://avatars.githubusercontent.com/u/1413553?v=3","gravatar_id":"","url":"https://api.github.com/users/kciesielski","html_url":"https://github.com/kciesielski","followers_url":"https://api.github.com/users/kciesielski/followers","following_url":"https://api.github.com/users/kciesielski/following{/other_user}","gists_url":"https://api.github.com/users/kciesielski/gists{/gist_id}","starred_url":"https://api.github.com/users/kciesielski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kciesielski/subscriptions","organizations_url":"https://api.github.com/users/kciesielski/orgs","repos_url":"https://api.github.com/users/kciesielski/repos","events_url":"https://api.github.com/users/kciesielski/events{/privacy}","received_events_url":"https://api.github.com/users/kciesielski/received_events","type":"User","site_admin":false},"body":"This PR introduces dropwizard metrics library for collecting test stats.\r\n1. Histogram is used to observe throughput. We increase histogram \"bars\" for each message in a particular second.\r\n2. Timer is used to observe latency. We calculate time spent on single \"request\".\r\n3. Data is stored in DynamoDB.\r\n4. One missing part is formatting in `ShowStats`. Once we agree that we have the correct data stored, we can polish this in a separate PR.","created_at":"2016-12-23T13:32:32Z","updated_at":"2016-12-27T08:07:41Z","closed_at":"2016-12-25T21:12:19Z","merged_at":"2016-12-25T21:12:19Z","merge_commit_sha":"3cab9135764c322371eac4c94e2701f10755859b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/softwaremill/mqperf/pulls/11/commits","review_comments_url":"https://api.github.com/repos/softwaremill/mqperf/pulls/11/comments","review_comment_url":"https://api.github.com/repos/softwaremill/mqperf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/softwaremill/mqperf/issues/11/comments","statuses_url":"https://api.github.com/repos/softwaremill/mqperf/statuses/255759b5f85ec92cd940de0eaace29a143a94392","head":{"label":"kciesielski:initial-metrics","ref":"initial-metrics","sha":"255759b5f85ec92cd940de0eaace29a143a94392","user":{"login":"kciesielski","id":1413553,"avatar_url":"https://avatars.githubusercontent.com/u/1413553?v=3","gravatar_id":"","url":"https://api.github.com/users/kciesielski","html_url":"https://github.com/kciesielski","followers_url":"https://api.github.com/users/kciesielski/followers","following_url":"https://api.github.com/users/kciesielski/following{/other_user}","gists_url":"https://api.github.com/users/kciesielski/gists{/gist_id}","starred_url":"https://api.github.com/users/kciesielski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kciesielski/subscriptions","organizations_url":"https://api.github.com/users/kciesielski/orgs","repos_url":"https://api.github.com/users/kciesielski/repos","events_url":"https://api.github.com/users/kciesielski/events{/privacy}","received_events_url":"https://api.github.com/users/kciesielski/received_events","type":"User","site_admin":false},"repo":{"id":76658719,"name":"mqperf","full_name":"kciesielski/mqperf","owner":{"login":"kciesielski","id":1413553,"avatar_url":"https://avatars.githubusercontent.com/u/1413553?v=3","gravatar_id":"","url":"https://api.github.com/users/kciesielski","html_url":"https://github.com/kciesielski","followers_url":"https://api.github.com/users/kciesielski/followers","following_url":"https://api.github.com/users/kciesielski/following{/other_user}","gists_url":"https://api.github.com/users/kciesielski/gists{/gist_id}","starred_url":"https://api.github.com/users/kciesielski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kciesielski/subscriptions","organizations_url":"https://api.github.com/users/kciesielski/orgs","repos_url":"https://api.github.com/users/kciesielski/repos","events_url":"https://api.github.com/users/kciesielski/events{/privacy}","received_events_url":"https://api.github.com/users/kciesielski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kciesielski/mqperf","description":null,"fork":true,"url":"https://api.github.com/repos/kciesielski/mqperf","forks_url":"https://api.github.com/repos/kciesielski/mqperf/forks","keys_url":"https://api.github.com/repos/kciesielski/mqperf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kciesielski/mqperf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kciesielski/mqperf/teams","hooks_url":"https://api.github.com/repos/kciesielski/mqperf/hooks","issue_events_url":"https://api.github.com/repos/kciesielski/mqperf/issues/events{/number}","events_url":"https://api.github.com/repos/kciesielski/mqperf/events","assignees_url":"https://api.github.com/repos/kciesielski/mqperf/assignees{/user}","branches_url":"https://api.github.com/repos/kciesielski/mqperf/branches{/branch}","tags_url":"https://api.github.com/repos/kciesielski/mqperf/tags","blobs_url":"https://api.github.com/repos/kciesielski/mqperf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kciesielski/mqperf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kciesielski/mqperf/git/refs{/sha}","trees_url":"https://api.github.com/repos/kciesielski/mqperf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kciesielski/mqperf/statuses/{sha}","languages_url":"https://api.github.com/repos/kciesielski/mqperf/languages","stargazers_url":"https://api.github.com/repos/kciesielski/mqperf/stargazers","contributors_url":"https://api.github.com/repos/kciesielski/mqperf/contributors","subscribers_url":"https://api.github.com/repos/kciesielski/mqperf/subscribers","subscription_url":"https://api.github.com/repos/kciesielski/mqperf/subscription","commits_url":"https://api.github.com/repos/kciesielski/mqperf/commits{/sha}","git_commits_url":"https://api.github.com/repos/kciesielski/mqperf/git/commits{/sha}","comments_url":"https://api.github.com/repos/kciesielski/mqperf/comments{/number}","issue_comment_url":"https://api.github.com/repos/kciesielski/mqperf/issues/comments{/number}","contents_url":"https://api.github.com/repos/kciesielski/mqperf/contents/{+path}","compare_url":"https://api.github.com/repos/kciesielski/mqperf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kciesielski/mqperf/merges","archive_url":"https://api.github.com/repos/kciesielski/mqperf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kciesielski/mqperf/downloads","issues_url":"https://api.github.com/repos/kciesielski/mqperf/issues{/number}","pulls_url":"https://api.github.com/repos/kciesielski/mqperf/pulls{/number}","milestones_url":"https://api.github.com/repos/kciesielski/mqperf/milestones{/number}","notifications_url":"https://api.github.com/repos/kciesielski/mqperf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kciesielski/mqperf/labels{/name}","releases_url":"https://api.github.com/repos/kciesielski/mqperf/releases{/id}","deployments_url":"https://api.github.com/repos/kciesielski/mqperf/deployments","created_at":"2016-12-16T14:11:31Z","updated_at":"2016-12-16T14:11:32Z","pushed_at":"2016-12-23T13:27:23Z","git_url":"git://github.com/kciesielski/mqperf.git","ssh_url":"git@github.com:kciesielski/mqperf.git","clone_url":"https://github.com/kciesielski/mqperf.git","svn_url":"https://github.com/kciesielski/mqperf","homepage":"https://softwaremill.com/mqperf/","size":132,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"softwaremill:master","ref":"master","sha":"4914d3a1405ff2ac94a28a4d7710a6022fcf1571","user":{"login":"softwaremill","id":322765,"avatar_url":"https://avatars.githubusercontent.com/u/322765?v=3","gravatar_id":"","url":"https://api.github.com/users/softwaremill","html_url":"https://github.com/softwaremill","followers_url":"https://api.github.com/users/softwaremill/followers","following_url":"https://api.github.com/users/softwaremill/following{/other_user}","gists_url":"https://api.github.com/users/softwaremill/gists{/gist_id}","starred_url":"https://api.github.com/users/softwaremill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwaremill/subscriptions","organizations_url":"https://api.github.com/users/softwaremill/orgs","repos_url":"https://api.github.com/users/softwaremill/repos","events_url":"https://api.github.com/users/softwaremill/events{/privacy}","received_events_url":"https://api.github.com/users/softwaremill/received_events","type":"Organization","site_admin":false},"repo":{"id":20400809,"name":"mqperf","full_name":"softwaremill/mqperf","owner":{"login":"softwaremill","id":322765,"avatar_url":"https://avatars.githubusercontent.com/u/322765?v=3","gravatar_id":"","url":"https://api.github.com/users/softwaremill","html_url":"https://github.com/softwaremill","followers_url":"https://api.github.com/users/softwaremill/followers","following_url":"https://api.github.com/users/softwaremill/following{/other_user}","gists_url":"https://api.github.com/users/softwaremill/gists{/gist_id}","starred_url":"https://api.github.com/users/softwaremill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwaremill/subscriptions","organizations_url":"https://api.github.com/users/softwaremill/orgs","repos_url":"https://api.github.com/users/softwaremill/repos","events_url":"https://api.github.com/users/softwaremill/events{/privacy}","received_events_url":"https://api.github.com/users/softwaremill/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/softwaremill/mqperf","description":null,"fork":false,"url":"https://api.github.com/repos/softwaremill/mqperf","forks_url":"https://api.github.com/repos/softwaremill/mqperf/forks","keys_url":"https://api.github.com/repos/softwaremill/mqperf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/softwaremill/mqperf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/softwaremill/mqperf/teams","hooks_url":"https://api.github.com/repos/softwaremill/mqperf/hooks","issue_events_url":"https://api.github.com/repos/softwaremill/mqperf/issues/events{/number}","events_url":"https://api.github.com/repos/softwaremill/mqperf/events","assignees_url":"https://api.github.com/repos/softwaremill/mqperf/assignees{/user}","branches_url":"https://api.github.com/repos/softwaremill/mqperf/branches{/branch}","tags_url":"https://api.github.com/repos/softwaremill/mqperf/tags","blobs_url":"https://api.github.com/repos/softwaremill/mqperf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/softwaremill/mqperf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/softwaremill/mqperf/git/refs{/sha}","trees_url":"https://api.github.com/repos/softwaremill/mqperf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/softwaremill/mqperf/statuses/{sha}","languages_url":"https://api.github.com/repos/softwaremill/mqperf/languages","stargazers_url":"https://api.github.com/repos/softwaremill/mqperf/stargazers","contributors_url":"https://api.github.com/repos/softwaremill/mqperf/contributors","subscribers_url":"https://api.github.com/repos/softwaremill/mqperf/subscribers","subscription_url":"https://api.github.com/repos/softwaremill/mqperf/subscription","commits_url":"https://api.github.com/repos/softwaremill/mqperf/commits{/sha}","git_commits_url":"https://api.github.com/repos/softwaremill/mqperf/git/commits{/sha}","comments_url":"https://api.github.com/repos/softwaremill/mqperf/comments{/number}","issue_comment_url":"https://api.github.com/repos/softwaremill/mqperf/issues/comments{/number}","contents_url":"https://api.github.com/repos/softwaremill/mqperf/contents/{+path}","compare_url":"https://api.github.com/repos/softwaremill/mqperf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/softwaremill/mqperf/merges","archive_url":"https://api.github.com/repos/softwaremill/mqperf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/softwaremill/mqperf/downloads","issues_url":"https://api.github.com/repos/softwaremill/mqperf/issues{/number}","pulls_url":"https://api.github.com/repos/softwaremill/mqperf/pulls{/number}","milestones_url":"https://api.github.com/repos/softwaremill/mqperf/milestones{/number}","notifications_url":"https://api.github.com/repos/softwaremill/mqperf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/softwaremill/mqperf/labels{/name}","releases_url":"https://api.github.com/repos/softwaremill/mqperf/releases{/id}","deployments_url":"https://api.github.com/repos/softwaremill/mqperf/deployments","created_at":"2014-06-02T10:50:43Z","updated_at":"2016-12-18T02:27:04Z","pushed_at":"2016-12-25T21:12:19Z","git_url":"git://github.com/softwaremill/mqperf.git","ssh_url":"git@github.com:softwaremill/mqperf.git","clone_url":"https://github.com/softwaremill/mqperf.git","svn_url":"https://github.com/softwaremill/mqperf","homepage":"https://softwaremill.com/mqperf/","size":134,"stargazers_count":40,"watchers_count":40,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/softwaremill/mqperf/pulls/11"},"html":{"href":"https://github.com/softwaremill/mqperf/pull/11"},"issue":{"href":"https://api.github.com/repos/softwaremill/mqperf/issues/11"},"comments":{"href":"https://api.github.com/repos/softwaremill/mqperf/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/softwaremill/mqperf/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/softwaremill/mqperf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/softwaremill/mqperf/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/softwaremill/mqperf/statuses/255759b5f85ec92cd940de0eaace29a143a94392"}}}}
{"actor":{"display_login":"kciesielski"}}