{"action":"created","comment":{"url":"https://api.github.com/repos/square/inspect/pulls/comments/34400672","id":34400672,"diff_hunk":"@@ -0,0 +1,29 @@\n+package qrt\n+\n+import (\n+\t\"testing\"\n+)\n+\n+func TestPercentile(t *testing.T) {\n+\tvar h MysqlQrtHistogram\n+\n+\th = append(h, NewMysqlQrtBucket(string(85), 1, 85))\n+\th = append(h, NewMysqlQrtBucket(string(34), 1, 34))\n+\th = append(h, NewMysqlQrtBucket(string(42), 1, 42))\n+\th = append(h, NewMysqlQrtBucket(string(51), 1, 51))\n+\th = append(h, NewMysqlQrtBucket(string(84), 1, 84))\n+\th = append(h, NewMysqlQrtBucket(string(86), 1, 86))\n+\th = append(h, NewMysqlQrtBucket(string(78), 1, 78))\n+\th = append(h, NewMysqlQrtBucket(string(85), 1, 85))\n+\th = append(h, NewMysqlQrtBucket(string(87), 1, 87))\n+\th = append(h, NewMysqlQrtBucket(string(69), 1, 69))\n+\th = append(h, NewMysqlQrtBucket(string(94), 1, 94))\n+\th = append(h, NewMysqlQrtBucket(string(74), 1, 74))\n+\th = append(h, NewMysqlQrtBucket(string(65), 1, 65))\n+\th = append(h, NewMysqlQrtBucket(string(56), 1, 56))\n+\th = append(h, NewMysqlQrtBucket(string(97), 1, 97))\n+\tif h.Percentile(90) != 94 {\n+\t\tt.FailNow()\n+\t}","path":"mysql/qrt/qrt_test.go","position":27,"original_position":27,"commit_id":"fbd5ff6e82ba729160fad2abfe476bb013f670bf","original_commit_id":"fbd5ff6e82ba729160fad2abfe476bb013f670bf","user":{"login":"jeeyoungk","id":232784,"avatar_url":"https://avatars.githubusercontent.com/u/232784?v=3","gravatar_id":"","url":"https://api.github.com/users/jeeyoungk","html_url":"https://github.com/jeeyoungk","followers_url":"https://api.github.com/users/jeeyoungk/followers","following_url":"https://api.github.com/users/jeeyoungk/following{/other_user}","gists_url":"https://api.github.com/users/jeeyoungk/gists{/gist_id}","starred_url":"https://api.github.com/users/jeeyoungk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeeyoungk/subscriptions","organizations_url":"https://api.github.com/users/jeeyoungk/orgs","repos_url":"https://api.github.com/users/jeeyoungk/repos","events_url":"https://api.github.com/users/jeeyoungk/events{/privacy}","received_events_url":"https://api.github.com/users/jeeyoungk/received_events","type":"User","site_admin":false},"body":"nit: whitespace.","created_at":"2015-07-10T22:07:36Z","updated_at":"2015-07-10T22:07:36Z","html_url":"https://github.com/square/inspect/pull/20#discussion_r34400672","pull_request_url":"https://api.github.com/repos/square/inspect/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/square/inspect/pulls/comments/34400672"},"html":{"href":"https://github.com/square/inspect/pull/20#discussion_r34400672"},"pull_request":{"href":"https://api.github.com/repos/square/inspect/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/square/inspect/pulls/20","id":39728522,"html_url":"https://github.com/square/inspect/pull/20","diff_url":"https://github.com/square/inspect/pull/20.diff","patch_url":"https://github.com/square/inspect/pull/20.patch","issue_url":"https://api.github.com/repos/square/inspect/issues/20","number":20,"state":"open","locked":false,"title":"Adding qrt package","user":{"login":"jcesario","id":2256137,"avatar_url":"https://avatars.githubusercontent.com/u/2256137?v=3","gravatar_id":"","url":"https://api.github.com/users/jcesario","html_url":"https://github.com/jcesario","followers_url":"https://api.github.com/users/jcesario/followers","following_url":"https://api.github.com/users/jcesario/following{/other_user}","gists_url":"https://api.github.com/users/jcesario/gists{/gist_id}","starred_url":"https://api.github.com/users/jcesario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcesario/subscriptions","organizations_url":"https://api.github.com/users/jcesario/orgs","repos_url":"https://api.github.com/users/jcesario/repos","events_url":"https://api.github.com/users/jcesario/events{/privacy}","received_events_url":"https://api.github.com/users/jcesario/received_events","type":"User","site_admin":false},"body":"calculate percentiles instead of pulling raw bins from histogram\r\n","created_at":"2015-07-10T21:59:37Z","updated_at":"2015-07-10T22:07:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2af3442621310ceae3ce9d89b064f2d2f860e873","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/inspect/pulls/20/commits","review_comments_url":"https://api.github.com/repos/square/inspect/pulls/20/comments","review_comment_url":"https://api.github.com/repos/square/inspect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/inspect/issues/20/comments","statuses_url":"https://api.github.com/repos/square/inspect/statuses/fbd5ff6e82ba729160fad2abfe476bb013f670bf","head":{"label":"jcesario:cesario/addpctl","ref":"cesario/addpctl","sha":"fbd5ff6e82ba729160fad2abfe476bb013f670bf","user":{"login":"jcesario","id":2256137,"avatar_url":"https://avatars.githubusercontent.com/u/2256137?v=3","gravatar_id":"","url":"https://api.github.com/users/jcesario","html_url":"https://github.com/jcesario","followers_url":"https://api.github.com/users/jcesario/followers","following_url":"https://api.github.com/users/jcesario/following{/other_user}","gists_url":"https://api.github.com/users/jcesario/gists{/gist_id}","starred_url":"https://api.github.com/users/jcesario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcesario/subscriptions","organizations_url":"https://api.github.com/users/jcesario/orgs","repos_url":"https://api.github.com/users/jcesario/repos","events_url":"https://api.github.com/users/jcesario/events{/privacy}","received_events_url":"https://api.github.com/users/jcesario/received_events","type":"User","site_admin":false},"repo":{"id":38903287,"name":"inspect","full_name":"jcesario/inspect","owner":{"login":"jcesario","id":2256137,"avatar_url":"https://avatars.githubusercontent.com/u/2256137?v=3","gravatar_id":"","url":"https://api.github.com/users/jcesario","html_url":"https://github.com/jcesario","followers_url":"https://api.github.com/users/jcesario/followers","following_url":"https://api.github.com/users/jcesario/following{/other_user}","gists_url":"https://api.github.com/users/jcesario/gists{/gist_id}","starred_url":"https://api.github.com/users/jcesario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcesario/subscriptions","organizations_url":"https://api.github.com/users/jcesario/orgs","repos_url":"https://api.github.com/users/jcesario/repos","events_url":"https://api.github.com/users/jcesario/events{/privacy}","received_events_url":"https://api.github.com/users/jcesario/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcesario/inspect","description":"inspect is a collection of metrics collection, analysis utilities for various subsystems of linux, mysql and postgres.","fork":true,"url":"https://api.github.com/repos/jcesario/inspect","forks_url":"https://api.github.com/repos/jcesario/inspect/forks","keys_url":"https://api.github.com/repos/jcesario/inspect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcesario/inspect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcesario/inspect/teams","hooks_url":"https://api.github.com/repos/jcesario/inspect/hooks","issue_events_url":"https://api.github.com/repos/jcesario/inspect/issues/events{/number}","events_url":"https://api.github.com/repos/jcesario/inspect/events","assignees_url":"https://api.github.com/repos/jcesario/inspect/assignees{/user}","branches_url":"https://api.github.com/repos/jcesario/inspect/branches{/branch}","tags_url":"https://api.github.com/repos/jcesario/inspect/tags","blobs_url":"https://api.github.com/repos/jcesario/inspect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcesario/inspect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcesario/inspect/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcesario/inspect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcesario/inspect/statuses/{sha}","languages_url":"https://api.github.com/repos/jcesario/inspect/languages","stargazers_url":"https://api.github.com/repos/jcesario/inspect/stargazers","contributors_url":"https://api.github.com/repos/jcesario/inspect/contributors","subscribers_url":"https://api.github.com/repos/jcesario/inspect/subscribers","subscription_url":"https://api.github.com/repos/jcesario/inspect/subscription","commits_url":"https://api.github.com/repos/jcesario/inspect/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcesario/inspect/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcesario/inspect/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcesario/inspect/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcesario/inspect/contents/{+path}","compare_url":"https://api.github.com/repos/jcesario/inspect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcesario/inspect/merges","archive_url":"https://api.github.com/repos/jcesario/inspect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcesario/inspect/downloads","issues_url":"https://api.github.com/repos/jcesario/inspect/issues{/number}","pulls_url":"https://api.github.com/repos/jcesario/inspect/pulls{/number}","milestones_url":"https://api.github.com/repos/jcesario/inspect/milestones{/number}","notifications_url":"https://api.github.com/repos/jcesario/inspect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcesario/inspect/labels{/name}","releases_url":"https://api.github.com/repos/jcesario/inspect/releases{/id}","created_at":"2015-07-10T21:41:14Z","updated_at":"2015-07-10T21:41:14Z","pushed_at":"2015-07-10T21:57:27Z","git_url":"git://github.com/jcesario/inspect.git","ssh_url":"git@github.com:jcesario/inspect.git","clone_url":"https://github.com/jcesario/inspect.git","svn_url":"https://github.com/jcesario/inspect","homepage":"","size":6059,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"square:master","ref":"master","sha":"c8f7b44a67ab9037882ce20038705b25b102d392","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":35698729,"name":"inspect","full_name":"square/inspect","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/inspect","description":"inspect is a collection of metrics collection, analysis utilities for various subsystems of linux, mysql and postgres.","fork":false,"url":"https://api.github.com/repos/square/inspect","forks_url":"https://api.github.com/repos/square/inspect/forks","keys_url":"https://api.github.com/repos/square/inspect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/inspect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/inspect/teams","hooks_url":"https://api.github.com/repos/square/inspect/hooks","issue_events_url":"https://api.github.com/repos/square/inspect/issues/events{/number}","events_url":"https://api.github.com/repos/square/inspect/events","assignees_url":"https://api.github.com/repos/square/inspect/assignees{/user}","branches_url":"https://api.github.com/repos/square/inspect/branches{/branch}","tags_url":"https://api.github.com/repos/square/inspect/tags","blobs_url":"https://api.github.com/repos/square/inspect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/inspect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/inspect/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/inspect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/inspect/statuses/{sha}","languages_url":"https://api.github.com/repos/square/inspect/languages","stargazers_url":"https://api.github.com/repos/square/inspect/stargazers","contributors_url":"https://api.github.com/repos/square/inspect/contributors","subscribers_url":"https://api.github.com/repos/square/inspect/subscribers","subscription_url":"https://api.github.com/repos/square/inspect/subscription","commits_url":"https://api.github.com/repos/square/inspect/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/inspect/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/inspect/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/inspect/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/inspect/contents/{+path}","compare_url":"https://api.github.com/repos/square/inspect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/inspect/merges","archive_url":"https://api.github.com/repos/square/inspect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/inspect/downloads","issues_url":"https://api.github.com/repos/square/inspect/issues{/number}","pulls_url":"https://api.github.com/repos/square/inspect/pulls{/number}","milestones_url":"https://api.github.com/repos/square/inspect/milestones{/number}","notifications_url":"https://api.github.com/repos/square/inspect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/inspect/labels{/name}","releases_url":"https://api.github.com/repos/square/inspect/releases{/id}","created_at":"2015-05-15T21:57:57Z","updated_at":"2015-07-10T18:09:58Z","pushed_at":"2015-07-10T21:59:38Z","git_url":"git://github.com/square/inspect.git","ssh_url":"git@github.com:square/inspect.git","clone_url":"https://github.com/square/inspect.git","svn_url":"https://github.com/square/inspect","homepage":"","size":6059,"stargazers_count":31,"watchers_count":31,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":1,"forks":9,"open_issues":1,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/inspect/pulls/20"},"html":{"href":"https://github.com/square/inspect/pull/20"},"issue":{"href":"https://api.github.com/repos/square/inspect/issues/20"},"comments":{"href":"https://api.github.com/repos/square/inspect/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/square/inspect/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/square/inspect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/inspect/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/square/inspect/statuses/fbd5ff6e82ba729160fad2abfe476bb013f670bf"}}}}