{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/node_exporter/pulls/comments/170350053","pull_request_review_id":99031107,"id":170350053,"diff_hunk":"@@ -104,11 +104,20 @@ func (c *cpuCollector) updateCPUfreq(ch chan<- prometheus.Metric) error {\n \n \tvar value uint64\n \n+\tcpu_core_throttles := make(map[int]uint64)\n+\n \t// cpu loop\n \tfor _, cpu := range cpus {\n \t\t_, cpuName := filepath.Split(cpu)\n \t\tcpuNum := strings.TrimPrefix(cpuName, \"cpu\")\n \n+\t\tcore_id := -1\n+\t\tif value, err := readUintFromFile(filepath.Join(cpu, \"topology/core_id\")); err != nil {","path":"collector/cpu_linux.go","position":null,"original_position":33,"commit_id":"7c33b1601cce5d98faa943b372674b57cbb0b181","original_commit_id":"f2f2a7350a2754fdcb77360e83ca6eb9b9e3da6b","user":{"login":"rtreffer","id":61306,"avatar_url":"https://avatars3.githubusercontent.com/u/61306?v=4","gravatar_id":"","url":"https://api.github.com/users/rtreffer","html_url":"https://github.com/rtreffer","followers_url":"https://api.github.com/users/rtreffer/followers","following_url":"https://api.github.com/users/rtreffer/following{/other_user}","gists_url":"https://api.github.com/users/rtreffer/gists{/gist_id}","starred_url":"https://api.github.com/users/rtreffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtreffer/subscriptions","organizations_url":"https://api.github.com/users/rtreffer/orgs","repos_url":"https://api.github.com/users/rtreffer/repos","events_url":"https://api.github.com/users/rtreffer/events{/privacy}","received_events_url":"https://api.github.com/users/rtreffer/received_events","type":"User","site_admin":false},"body":"I moved it to an outer if as there is no need to read thermal throttles if we don't have the core_id.\r\n\r\nCI is running....","created_at":"2018-02-23T19:47:30Z","updated_at":"2018-02-23T19:47:30Z","html_url":"https://github.com/prometheus/node_exporter/pull/836#discussion_r170350053","pull_request_url":"https://api.github.com/repos/prometheus/node_exporter/pulls/836","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/prometheus/node_exporter/pulls/comments/170350053"},"html":{"href":"https://github.com/prometheus/node_exporter/pull/836#discussion_r170350053"},"pull_request":{"href":"https://api.github.com/repos/prometheus/node_exporter/pulls/836"}},"in_reply_to_id":170185175},"pull_request":{"url":"https://api.github.com/repos/prometheus/node_exporter/pulls/836","id":170865119,"html_url":"https://github.com/prometheus/node_exporter/pull/836","diff_url":"https://github.com/prometheus/node_exporter/pull/836.diff","patch_url":"https://github.com/prometheus/node_exporter/pull/836.patch","issue_url":"https://api.github.com/repos/prometheus/node_exporter/issues/836","number":836,"state":"open","locked":false,"title":"Only report core throttles per core, not per cpu","user":{"login":"rtreffer","id":61306,"avatar_url":"https://avatars3.githubusercontent.com/u/61306?v=4","gravatar_id":"","url":"https://api.github.com/users/rtreffer","html_url":"https://github.com/rtreffer","followers_url":"https://api.github.com/users/rtreffer/followers","following_url":"https://api.github.com/users/rtreffer/following{/other_user}","gists_url":"https://api.github.com/users/rtreffer/gists{/gist_id}","starred_url":"https://api.github.com/users/rtreffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtreffer/subscriptions","organizations_url":"https://api.github.com/users/rtreffer/orgs","repos_url":"https://api.github.com/users/rtreffer/repos","events_url":"https://api.github.com/users/rtreffer/events{/privacy}","received_events_url":"https://api.github.com/users/rtreffer/received_events","type":"User","site_admin":false},"body":"Fixes #659 ","created_at":"2018-02-22T21:03:40Z","updated_at":"2018-02-23T19:47:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dee8bc4d1dedab3f4bae75db27921b35f58ac94","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/node_exporter/pulls/836/commits","review_comments_url":"https://api.github.com/repos/prometheus/node_exporter/pulls/836/comments","review_comment_url":"https://api.github.com/repos/prometheus/node_exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/node_exporter/issues/836/comments","statuses_url":"https://api.github.com/repos/prometheus/node_exporter/statuses/7c33b1601cce5d98faa943b372674b57cbb0b181","head":{"label":"rtreffer:rtreffer/fix-node-cpu-throttles","ref":"rtreffer/fix-node-cpu-throttles","sha":"7c33b1601cce5d98faa943b372674b57cbb0b181","user":{"login":"rtreffer","id":61306,"avatar_url":"https://avatars3.githubusercontent.com/u/61306?v=4","gravatar_id":"","url":"https://api.github.com/users/rtreffer","html_url":"https://github.com/rtreffer","followers_url":"https://api.github.com/users/rtreffer/followers","following_url":"https://api.github.com/users/rtreffer/following{/other_user}","gists_url":"https://api.github.com/users/rtreffer/gists{/gist_id}","starred_url":"https://api.github.com/users/rtreffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtreffer/subscriptions","organizations_url":"https://api.github.com/users/rtreffer/orgs","repos_url":"https://api.github.com/users/rtreffer/repos","events_url":"https://api.github.com/users/rtreffer/events{/privacy}","received_events_url":"https://api.github.com/users/rtreffer/received_events","type":"User","site_admin":false},"repo":{"id":64123198,"name":"node_exporter","full_name":"rtreffer/node_exporter","owner":{"login":"rtreffer","id":61306,"avatar_url":"https://avatars3.githubusercontent.com/u/61306?v=4","gravatar_id":"","url":"https://api.github.com/users/rtreffer","html_url":"https://github.com/rtreffer","followers_url":"https://api.github.com/users/rtreffer/followers","following_url":"https://api.github.com/users/rtreffer/following{/other_user}","gists_url":"https://api.github.com/users/rtreffer/gists{/gist_id}","starred_url":"https://api.github.com/users/rtreffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtreffer/subscriptions","organizations_url":"https://api.github.com/users/rtreffer/orgs","repos_url":"https://api.github.com/users/rtreffer/repos","events_url":"https://api.github.com/users/rtreffer/events{/privacy}","received_events_url":"https://api.github.com/users/rtreffer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rtreffer/node_exporter","description":"Exporter for machine metrics","fork":true,"url":"https://api.github.com/repos/rtreffer/node_exporter","forks_url":"https://api.github.com/repos/rtreffer/node_exporter/forks","keys_url":"https://api.github.com/repos/rtreffer/node_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtreffer/node_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtreffer/node_exporter/teams","hooks_url":"https://api.github.com/repos/rtreffer/node_exporter/hooks","issue_events_url":"https://api.github.com/repos/rtreffer/node_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/rtreffer/node_exporter/events","assignees_url":"https://api.github.com/repos/rtreffer/node_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/rtreffer/node_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/rtreffer/node_exporter/tags","blobs_url":"https://api.github.com/repos/rtreffer/node_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtreffer/node_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtreffer/node_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtreffer/node_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtreffer/node_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/rtreffer/node_exporter/languages","stargazers_url":"https://api.github.com/repos/rtreffer/node_exporter/stargazers","contributors_url":"https://api.github.com/repos/rtreffer/node_exporter/contributors","subscribers_url":"https://api.github.com/repos/rtreffer/node_exporter/subscribers","subscription_url":"https://api.github.com/repos/rtreffer/node_exporter/subscription","commits_url":"https://api.github.com/repos/rtreffer/node_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtreffer/node_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtreffer/node_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtreffer/node_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtreffer/node_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/rtreffer/node_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtreffer/node_exporter/merges","archive_url":"https://api.github.com/repos/rtreffer/node_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtreffer/node_exporter/downloads","issues_url":"https://api.github.com/repos/rtreffer/node_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/rtreffer/node_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/rtreffer/node_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/rtreffer/node_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtreffer/node_exporter/labels{/name}","releases_url":"https://api.github.com/repos/rtreffer/node_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/rtreffer/node_exporter/deployments","created_at":"2016-07-25T09:51:12Z","updated_at":"2016-07-25T09:51:15Z","pushed_at":"2018-02-23T19:46:30Z","git_url":"git://github.com/rtreffer/node_exporter.git","ssh_url":"git@github.com:rtreffer/node_exporter.git","clone_url":"https://github.com/rtreffer/node_exporter.git","svn_url":"https://github.com/rtreffer/node_exporter","homepage":"https://prometheus.io/","size":3622,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prometheus:master","ref":"master","sha":"79ae03c4c7315eeebab360bceb6ac16722265418","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars3.githubusercontent.com/u/3380462?v=4","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":9524057,"name":"node_exporter","full_name":"prometheus/node_exporter","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars3.githubusercontent.com/u/3380462?v=4","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/node_exporter","description":"Exporter for machine metrics","fork":false,"url":"https://api.github.com/repos/prometheus/node_exporter","forks_url":"https://api.github.com/repos/prometheus/node_exporter/forks","keys_url":"https://api.github.com/repos/prometheus/node_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/node_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/node_exporter/teams","hooks_url":"https://api.github.com/repos/prometheus/node_exporter/hooks","issue_events_url":"https://api.github.com/repos/prometheus/node_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/node_exporter/events","assignees_url":"https://api.github.com/repos/prometheus/node_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/node_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/node_exporter/tags","blobs_url":"https://api.github.com/repos/prometheus/node_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/node_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/node_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/node_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/node_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/node_exporter/languages","stargazers_url":"https://api.github.com/repos/prometheus/node_exporter/stargazers","contributors_url":"https://api.github.com/repos/prometheus/node_exporter/contributors","subscribers_url":"https://api.github.com/repos/prometheus/node_exporter/subscribers","subscription_url":"https://api.github.com/repos/prometheus/node_exporter/subscription","commits_url":"https://api.github.com/repos/prometheus/node_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/node_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/node_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/node_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/node_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/node_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/node_exporter/merges","archive_url":"https://api.github.com/repos/prometheus/node_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/node_exporter/downloads","issues_url":"https://api.github.com/repos/prometheus/node_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/node_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/node_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/node_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/node_exporter/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/node_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/node_exporter/deployments","created_at":"2013-04-18T14:44:52Z","updated_at":"2018-02-23T19:41:46Z","pushed_at":"2018-02-23T19:46:32Z","git_url":"git://github.com/prometheus/node_exporter.git","ssh_url":"git@github.com:prometheus/node_exporter.git","clone_url":"https://github.com/prometheus/node_exporter.git","svn_url":"https://github.com/prometheus/node_exporter","homepage":"https://prometheus.io/","size":3594,"stargazers_count":1299,"watchers_count":1299,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":380,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":380,"open_issues":63,"watchers":1299,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/node_exporter/pulls/836"},"html":{"href":"https://github.com/prometheus/node_exporter/pull/836"},"issue":{"href":"https://api.github.com/repos/prometheus/node_exporter/issues/836"},"comments":{"href":"https://api.github.com/repos/prometheus/node_exporter/issues/836/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/node_exporter/pulls/836/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/node_exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/node_exporter/pulls/836/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/node_exporter/statuses/7c33b1601cce5d98faa943b372674b57cbb0b181"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rtreffer"}}