{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/heapster/pulls/comments/151706866","pull_request_review_id":77460988,"id":151706866,"diff_hunk":"@@ -244,8 +268,52 @@ func TestPreprocessMemoryMetrics(t *testing.T) {\n \t\t},\n \t}\n \n-\tcomputedMetrics := sink.preprocessMemoryMetrics(metricSet)\n+\tcomputedMetrics := sink.computeDerivedMetrics(metricSet)\n \n \tas.Equal(int64(96), computedMetrics.MetricValues[\"memory/bytes_used\"].IntValue)\n \tas.Equal(int64(13), computedMetrics.MetricValues[\"memory/minor_page_faults\"].IntValue)\n }\n+\n+func TestTranslateMetricSet(t *testing.T) {\n+\tas := assert.New(t)\n+\n+\tcontainerUptime := testTranslateMetric(as, generateIntMetric(1000), \"uptime\", containerLabels, \"kubernetes.io/container/uptime\")","path":"metrics/sinks/stackdriver/stackdriver_test.go","position":null,"original_position":195,"commit_id":"1bd053f8ba88723ff8f00a49d490322dff82b072","original_commit_id":"81b85b503a49591e5585f9be2b37c3b29ce25aec","user":{"login":"kawych","id":1265228,"avatar_url":"https://avatars3.githubusercontent.com/u/1265228?v=4","gravatar_id":"","url":"https://api.github.com/users/kawych","html_url":"https://github.com/kawych","followers_url":"https://api.github.com/users/kawych/followers","following_url":"https://api.github.com/users/kawych/following{/other_user}","gists_url":"https://api.github.com/users/kawych/gists{/gist_id}","starred_url":"https://api.github.com/users/kawych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawych/subscriptions","organizations_url":"https://api.github.com/users/kawych/orgs","repos_url":"https://api.github.com/users/kawych/repos","events_url":"https://api.github.com/users/kawych/events{/privacy}","received_events_url":"https://api.github.com/users/kawych/received_events","type":"User","site_admin":false},"body":"done","created_at":"2017-11-17T15:08:21Z","updated_at":"2017-11-17T15:08:21Z","html_url":"https://github.com/kubernetes/heapster/pull/1874#discussion_r151706866","pull_request_url":"https://api.github.com/repos/kubernetes/heapster/pulls/1874","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/heapster/pulls/comments/151706866"},"html":{"href":"https://github.com/kubernetes/heapster/pull/1874#discussion_r151706866"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/heapster/pulls/1874"}},"in_reply_to_id":151698771},"pull_request":{"url":"https://api.github.com/repos/kubernetes/heapster/pulls/1874","id":152276122,"html_url":"https://github.com/kubernetes/heapster/pull/1874","diff_url":"https://github.com/kubernetes/heapster/pull/1874.diff","patch_url":"https://github.com/kubernetes/heapster/pull/1874.patch","issue_url":"https://api.github.com/repos/kubernetes/heapster/issues/1874","number":1874,"state":"open","locked":false,"title":"Support new Stackdriver resource model in Heapster","user":{"login":"kawych","id":1265228,"avatar_url":"https://avatars3.githubusercontent.com/u/1265228?v=4","gravatar_id":"","url":"https://api.github.com/users/kawych","html_url":"https://github.com/kawych","followers_url":"https://api.github.com/users/kawych/followers","following_url":"https://api.github.com/users/kawych/following{/other_user}","gists_url":"https://api.github.com/users/kawych/gists{/gist_id}","starred_url":"https://api.github.com/users/kawych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawych/subscriptions","organizations_url":"https://api.github.com/users/kawych/orgs","repos_url":"https://api.github.com/users/kawych/repos","events_url":"https://api.github.com/users/kawych/events{/privacy}","received_events_url":"https://api.github.com/users/kawych/received_events","type":"User","site_admin":false},"body":"For new resource model, Heapster will export mostly the same metrics with new names and monitored resource, with following differences:\r\n- Metrics for pod that are simple aggregations of one metric for lower-level resource are not exported (for node there are no such metrics).\r\n- Metrics for disk are removed. They are going to be replaced by volume metrics for pods (in a follow up PR) and ephemeral-storage metrics when ephemeral-storage is introduced as Kubernetes resource.\r\n- New metrics will be exposed: container uptime, container request for cpu and memory, restart_count (in a follow up PR), node allocatable cpu and memory.","created_at":"2017-11-13T15:59:03Z","updated_at":"2017-11-17T15:08:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd906e4edd8452027b3701ed4be0182ec848aa12","assignee":{"login":"crassirostris","id":1756505,"avatar_url":"https://avatars1.githubusercontent.com/u/1756505?v=4","gravatar_id":"","url":"https://api.github.com/users/crassirostris","html_url":"https://github.com/crassirostris","followers_url":"https://api.github.com/users/crassirostris/followers","following_url":"https://api.github.com/users/crassirostris/following{/other_user}","gists_url":"https://api.github.com/users/crassirostris/gists{/gist_id}","starred_url":"https://api.github.com/users/crassirostris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crassirostris/subscriptions","organizations_url":"https://api.github.com/users/crassirostris/orgs","repos_url":"https://api.github.com/users/crassirostris/repos","events_url":"https://api.github.com/users/crassirostris/events{/privacy}","received_events_url":"https://api.github.com/users/crassirostris/received_events","type":"User","site_admin":false},"assignees":[{"login":"crassirostris","id":1756505,"avatar_url":"https://avatars1.githubusercontent.com/u/1756505?v=4","gravatar_id":"","url":"https://api.github.com/users/crassirostris","html_url":"https://github.com/crassirostris","followers_url":"https://api.github.com/users/crassirostris/followers","following_url":"https://api.github.com/users/crassirostris/following{/other_user}","gists_url":"https://api.github.com/users/crassirostris/gists{/gist_id}","starred_url":"https://api.github.com/users/crassirostris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crassirostris/subscriptions","organizations_url":"https://api.github.com/users/crassirostris/orgs","repos_url":"https://api.github.com/users/crassirostris/repos","events_url":"https://api.github.com/users/crassirostris/events{/privacy}","received_events_url":"https://api.github.com/users/crassirostris/received_events","type":"User","site_admin":false},{"login":"piosz","id":10819974,"avatar_url":"https://avatars0.githubusercontent.com/u/10819974?v=4","gravatar_id":"","url":"https://api.github.com/users/piosz","html_url":"https://github.com/piosz","followers_url":"https://api.github.com/users/piosz/followers","following_url":"https://api.github.com/users/piosz/following{/other_user}","gists_url":"https://api.github.com/users/piosz/gists{/gist_id}","starred_url":"https://api.github.com/users/piosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piosz/subscriptions","organizations_url":"https://api.github.com/users/piosz/orgs","repos_url":"https://api.github.com/users/piosz/repos","events_url":"https://api.github.com/users/piosz/events{/privacy}","received_events_url":"https://api.github.com/users/piosz/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/heapster/pulls/1874/commits","review_comments_url":"https://api.github.com/repos/kubernetes/heapster/pulls/1874/comments","review_comment_url":"https://api.github.com/repos/kubernetes/heapster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/heapster/issues/1874/comments","statuses_url":"https://api.github.com/repos/kubernetes/heapster/statuses/1bd053f8ba88723ff8f00a49d490322dff82b072","head":{"label":"kawych:new_metrics","ref":"new_metrics","sha":"1bd053f8ba88723ff8f00a49d490322dff82b072","user":{"login":"kawych","id":1265228,"avatar_url":"https://avatars3.githubusercontent.com/u/1265228?v=4","gravatar_id":"","url":"https://api.github.com/users/kawych","html_url":"https://github.com/kawych","followers_url":"https://api.github.com/users/kawych/followers","following_url":"https://api.github.com/users/kawych/following{/other_user}","gists_url":"https://api.github.com/users/kawych/gists{/gist_id}","starred_url":"https://api.github.com/users/kawych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawych/subscriptions","organizations_url":"https://api.github.com/users/kawych/orgs","repos_url":"https://api.github.com/users/kawych/repos","events_url":"https://api.github.com/users/kawych/events{/privacy}","received_events_url":"https://api.github.com/users/kawych/received_events","type":"User","site_admin":false},"repo":{"id":95462804,"name":"heapster","full_name":"kawych/heapster","owner":{"login":"kawych","id":1265228,"avatar_url":"https://avatars3.githubusercontent.com/u/1265228?v=4","gravatar_id":"","url":"https://api.github.com/users/kawych","html_url":"https://github.com/kawych","followers_url":"https://api.github.com/users/kawych/followers","following_url":"https://api.github.com/users/kawych/following{/other_user}","gists_url":"https://api.github.com/users/kawych/gists{/gist_id}","starred_url":"https://api.github.com/users/kawych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawych/subscriptions","organizations_url":"https://api.github.com/users/kawych/orgs","repos_url":"https://api.github.com/users/kawych/repos","events_url":"https://api.github.com/users/kawych/events{/privacy}","received_events_url":"https://api.github.com/users/kawych/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kawych/heapster","description":"Compute Resource Usage Analysis and Monitoring of Container Clusters","fork":true,"url":"https://api.github.com/repos/kawych/heapster","forks_url":"https://api.github.com/repos/kawych/heapster/forks","keys_url":"https://api.github.com/repos/kawych/heapster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kawych/heapster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kawych/heapster/teams","hooks_url":"https://api.github.com/repos/kawych/heapster/hooks","issue_events_url":"https://api.github.com/repos/kawych/heapster/issues/events{/number}","events_url":"https://api.github.com/repos/kawych/heapster/events","assignees_url":"https://api.github.com/repos/kawych/heapster/assignees{/user}","branches_url":"https://api.github.com/repos/kawych/heapster/branches{/branch}","tags_url":"https://api.github.com/repos/kawych/heapster/tags","blobs_url":"https://api.github.com/repos/kawych/heapster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kawych/heapster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kawych/heapster/git/refs{/sha}","trees_url":"https://api.github.com/repos/kawych/heapster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kawych/heapster/statuses/{sha}","languages_url":"https://api.github.com/repos/kawych/heapster/languages","stargazers_url":"https://api.github.com/repos/kawych/heapster/stargazers","contributors_url":"https://api.github.com/repos/kawych/heapster/contributors","subscribers_url":"https://api.github.com/repos/kawych/heapster/subscribers","subscription_url":"https://api.github.com/repos/kawych/heapster/subscription","commits_url":"https://api.github.com/repos/kawych/heapster/commits{/sha}","git_commits_url":"https://api.github.com/repos/kawych/heapster/git/commits{/sha}","comments_url":"https://api.github.com/repos/kawych/heapster/comments{/number}","issue_comment_url":"https://api.github.com/repos/kawych/heapster/issues/comments{/number}","contents_url":"https://api.github.com/repos/kawych/heapster/contents/{+path}","compare_url":"https://api.github.com/repos/kawych/heapster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kawych/heapster/merges","archive_url":"https://api.github.com/repos/kawych/heapster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kawych/heapster/downloads","issues_url":"https://api.github.com/repos/kawych/heapster/issues{/number}","pulls_url":"https://api.github.com/repos/kawych/heapster/pulls{/number}","milestones_url":"https://api.github.com/repos/kawych/heapster/milestones{/number}","notifications_url":"https://api.github.com/repos/kawych/heapster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kawych/heapster/labels{/name}","releases_url":"https://api.github.com/repos/kawych/heapster/releases{/id}","deployments_url":"https://api.github.com/repos/kawych/heapster/deployments","created_at":"2017-06-26T15:44:03Z","updated_at":"2017-06-26T15:44:07Z","pushed_at":"2017-11-17T15:07:41Z","git_url":"git://github.com/kawych/heapster.git","ssh_url":"git@github.com:kawych/heapster.git","clone_url":"https://github.com/kawych/heapster.git","svn_url":"https://github.com/kawych/heapster","homepage":"","size":37248,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"b1e157e7c44f7e67a08fdde62dc7d14a04302d1d","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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":23272510,"name":"heapster","full_name":"kubernetes/heapster","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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/heapster","description":"Compute Resource Usage Analysis and Monitoring of Container Clusters","fork":false,"url":"https://api.github.com/repos/kubernetes/heapster","forks_url":"https://api.github.com/repos/kubernetes/heapster/forks","keys_url":"https://api.github.com/repos/kubernetes/heapster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/heapster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/heapster/teams","hooks_url":"https://api.github.com/repos/kubernetes/heapster/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/heapster/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/heapster/events","assignees_url":"https://api.github.com/repos/kubernetes/heapster/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/heapster/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/heapster/tags","blobs_url":"https://api.github.com/repos/kubernetes/heapster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/heapster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/heapster/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/heapster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/heapster/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/heapster/languages","stargazers_url":"https://api.github.com/repos/kubernetes/heapster/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/heapster/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/heapster/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/heapster/subscription","commits_url":"https://api.github.com/repos/kubernetes/heapster/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/heapster/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/heapster/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/heapster/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/heapster/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/heapster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/heapster/merges","archive_url":"https://api.github.com/repos/kubernetes/heapster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/heapster/downloads","issues_url":"https://api.github.com/repos/kubernetes/heapster/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/heapster/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/heapster/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/heapster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/heapster/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/heapster/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/heapster/deployments","created_at":"2014-08-24T03:50:18Z","updated_at":"2017-11-16T02:48:08Z","pushed_at":"2017-11-17T15:07:47Z","git_url":"git://github.com/kubernetes/heapster.git","ssh_url":"git@github.com:kubernetes/heapster.git","clone_url":"https://github.com/kubernetes/heapster.git","svn_url":"https://github.com/kubernetes/heapster","homepage":"","size":39770,"stargazers_count":1561,"watchers_count":1561,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":804,"mirror_url":null,"archived":false,"open_issues_count":188,"forks":804,"open_issues":188,"watchers":1561,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/heapster/pulls/1874"},"html":{"href":"https://github.com/kubernetes/heapster/pull/1874"},"issue":{"href":"https://api.github.com/repos/kubernetes/heapster/issues/1874"},"comments":{"href":"https://api.github.com/repos/kubernetes/heapster/issues/1874/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/heapster/pulls/1874/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/heapster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/heapster/pulls/1874/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/heapster/statuses/1bd053f8ba88723ff8f00a49d490322dff82b072"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kawych"}}