{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/50467056","id":50467056,"diff_hunk":"@@ -0,0 +1,231 @@\n+/*\n+Copyright 2015 The Kubernetes Authors All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package src\n+\n+import (\n+\t\"fmt\"\n+\t\"math\"\n+\t\"os\"\n+\t\"sort\"\n+\t\"strings\"\n+\t\"text/tabwriter\"\n+\n+\t\"k8s.io/kubernetes/test/e2e\"\n+\n+\t\"github.com/golang/glog\"\n+)\n+\n+const (\n+\t// ResourceUsageVarianceAllowedPercent specifies how much variance we allow between results.\n+\t// Precise semantics is that we say that difference is too big if greater value is more than\n+\t// ResourceUsageVarianceAllowedPercent bigger than the smaller one. I.e. if X < Y, then Y is too\n+\t// big if Y > X + X*(ResourceUsageVarianceAllowedPercent/100).\n+\tResourceUsageVarianceAllowedPercent = 50\n+\t// To avoid false negatives we assume that minimal CPU usage is 5% and memory 50MB\n+\tminCPU = 0.05\n+\tminMem = int64(50 * 1024 * 1024)\n+)\n+\n+type percentileUsageData struct {\n+\tperc    string","path":"compare/src/compare-resources.go","position":44,"original_position":44,"commit_id":"c43fbcfe97fdc94122260862d7d32b3d01976145","original_commit_id":"c43fbcfe97fdc94122260862d7d32b3d01976145","user":{"login":"mwielgus","id":11994812,"avatar_url":"https://avatars.githubusercontent.com/u/11994812?v=3","gravatar_id":"","url":"https://api.github.com/users/mwielgus","html_url":"https://github.com/mwielgus","followers_url":"https://api.github.com/users/mwielgus/followers","following_url":"https://api.github.com/users/mwielgus/following{/other_user}","gists_url":"https://api.github.com/users/mwielgus/gists{/gist_id}","starred_url":"https://api.github.com/users/mwielgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwielgus/subscriptions","organizations_url":"https://api.github.com/users/mwielgus/orgs","repos_url":"https://api.github.com/users/mwielgus/repos","events_url":"https://api.github.com/users/mwielgus/events{/privacy}","received_events_url":"https://api.github.com/users/mwielgus/received_events","type":"User","site_admin":false},"body":"and why abbreviated?","created_at":"2016-01-21T21:28:35Z","updated_at":"2016-01-21T21:28:35Z","html_url":"https://github.com/kubernetes/contrib/pull/392#discussion_r50467056","pull_request_url":"https://api.github.com/repos/kubernetes/contrib/pulls/392","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/50467056"},"html":{"href":"https://github.com/kubernetes/contrib/pull/392#discussion_r50467056"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/392","id":56772702,"html_url":"https://github.com/kubernetes/contrib/pull/392","diff_url":"https://github.com/kubernetes/contrib/pull/392.diff","patch_url":"https://github.com/kubernetes/contrib/pull/392.patch","issue_url":"https://api.github.com/repos/kubernetes/contrib/issues/392","number":392,"state":"open","locked":false,"title":"Comparator for resource usage.","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"body":"cc @fgrzadkowski @wojtek-t ","created_at":"2016-01-21T16:24:31Z","updated_at":"2016-01-21T21:28:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bdbfa93cc920f8a0b589a0ab36ded2334c157c5","assignee":{"login":"mwielgus","id":11994812,"avatar_url":"https://avatars.githubusercontent.com/u/11994812?v=3","gravatar_id":"","url":"https://api.github.com/users/mwielgus","html_url":"https://github.com/mwielgus","followers_url":"https://api.github.com/users/mwielgus/followers","following_url":"https://api.github.com/users/mwielgus/following{/other_user}","gists_url":"https://api.github.com/users/mwielgus/gists{/gist_id}","starred_url":"https://api.github.com/users/mwielgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwielgus/subscriptions","organizations_url":"https://api.github.com/users/mwielgus/orgs","repos_url":"https://api.github.com/users/mwielgus/repos","events_url":"https://api.github.com/users/mwielgus/events{/privacy}","received_events_url":"https://api.github.com/users/mwielgus/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/contrib/pulls/392/commits","review_comments_url":"https://api.github.com/repos/kubernetes/contrib/pulls/392/comments","review_comment_url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/contrib/issues/392/comments","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/c43fbcfe97fdc94122260862d7d32b3d01976145","head":{"label":"gmarek:resources","ref":"resources","sha":"c43fbcfe97fdc94122260862d7d32b3d01976145","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"repo":{"id":46272843,"name":"contrib","full_name":"gmarek/contrib","owner":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gmarek/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":true,"url":"https://api.github.com/repos/gmarek/contrib","forks_url":"https://api.github.com/repos/gmarek/contrib/forks","keys_url":"https://api.github.com/repos/gmarek/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gmarek/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gmarek/contrib/teams","hooks_url":"https://api.github.com/repos/gmarek/contrib/hooks","issue_events_url":"https://api.github.com/repos/gmarek/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/gmarek/contrib/events","assignees_url":"https://api.github.com/repos/gmarek/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/gmarek/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/gmarek/contrib/tags","blobs_url":"https://api.github.com/repos/gmarek/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gmarek/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gmarek/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/gmarek/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gmarek/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/gmarek/contrib/languages","stargazers_url":"https://api.github.com/repos/gmarek/contrib/stargazers","contributors_url":"https://api.github.com/repos/gmarek/contrib/contributors","subscribers_url":"https://api.github.com/repos/gmarek/contrib/subscribers","subscription_url":"https://api.github.com/repos/gmarek/contrib/subscription","commits_url":"https://api.github.com/repos/gmarek/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/gmarek/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/gmarek/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/gmarek/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/gmarek/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/gmarek/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gmarek/contrib/merges","archive_url":"https://api.github.com/repos/gmarek/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gmarek/contrib/downloads","issues_url":"https://api.github.com/repos/gmarek/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/gmarek/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/gmarek/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/gmarek/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gmarek/contrib/labels{/name}","releases_url":"https://api.github.com/repos/gmarek/contrib/releases{/id}","created_at":"2015-11-16T12:19:11Z","updated_at":"2015-11-16T12:19:12Z","pushed_at":"2016-01-21T19:00:09Z","git_url":"git://github.com/gmarek/contrib.git","ssh_url":"git@github.com:gmarek/contrib.git","clone_url":"https://github.com/gmarek/contrib.git","svn_url":"https://github.com/gmarek/contrib","homepage":"","size":16110,"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":"kubernetes:master","ref":"master","sha":"a1c776b55c19eeef2e1d08bac3b4609064b72650","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":40686014,"name":"contrib","full_name":"kubernetes/contrib","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":false,"url":"https://api.github.com/repos/kubernetes/contrib","forks_url":"https://api.github.com/repos/kubernetes/contrib/forks","keys_url":"https://api.github.com/repos/kubernetes/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/contrib/teams","hooks_url":"https://api.github.com/repos/kubernetes/contrib/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/contrib/events","assignees_url":"https://api.github.com/repos/kubernetes/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/contrib/tags","blobs_url":"https://api.github.com/repos/kubernetes/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/contrib/languages","stargazers_url":"https://api.github.com/repos/kubernetes/contrib/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/contrib/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/contrib/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/contrib/subscription","commits_url":"https://api.github.com/repos/kubernetes/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/contrib/merges","archive_url":"https://api.github.com/repos/kubernetes/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/contrib/downloads","issues_url":"https://api.github.com/repos/kubernetes/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/contrib/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/contrib/releases{/id}","created_at":"2015-08-13T23:18:26Z","updated_at":"2016-01-21T14:43:59Z","pushed_at":"2016-01-21T20:11:31Z","git_url":"git://github.com/kubernetes/contrib.git","ssh_url":"git@github.com:kubernetes/contrib.git","clone_url":"https://github.com/kubernetes/contrib.git","svn_url":"https://github.com/kubernetes/contrib","homepage":"","size":26356,"stargazers_count":139,"watchers_count":139,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":82,"forks":129,"open_issues":82,"watchers":139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/392"},"html":{"href":"https://github.com/kubernetes/contrib/pull/392"},"issue":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/392"},"comments":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/contrib/statuses/c43fbcfe97fdc94122260862d7d32b3d01976145"}}}}