{"action":"created","comment":{"url":"https://api.github.com/repos/google/cadvisor/pulls/comments/46768290","id":46768290,"diff_hunk":"@@ -163,6 +168,28 @@ func (self *realFramework) T() *testing.T {\n \treturn self.t\n }\n \n+func (self *realFramework) GetGoRoutines() (int, error) {\n+\n+\tpprofURL := fmt.Sprintf(\"%s/debug/pprof\", self.Hostname().FullHostname())\n+\tresp, err := http.Get(pprofURL)\n+\tif err != nil {\n+\t\treturn -1, err\n+\t}\n+\tdefer resp.Body.Close()\n+\tbody, err := ioutil.ReadAll(resp.Body)\n+\tif err != nil {\n+\t\treturn -1, err\n+\t}\n+\tr := regexp.MustCompile(\"right>([0-9]+)<td\")\n+\tfor _, line := range strings.Split(string(body), \"\\n\") {\n+\t\t// <tr><td align=right>42<td><a href=\"goroutine?debug=1\">goroutine</a>","path":"integration/framework/framework.go","position":38,"original_position":38,"commit_id":"8cc528621ccf9e7e2e4a72bff3c4e9a6cdcb9c0b","original_commit_id":"8cc528621ccf9e7e2e4a72bff3c4e9a6cdcb9c0b","user":{"login":"jimmidyson","id":464659,"avatar_url":"https://avatars.githubusercontent.com/u/464659?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmidyson","html_url":"https://github.com/jimmidyson","followers_url":"https://api.github.com/users/jimmidyson/followers","following_url":"https://api.github.com/users/jimmidyson/following{/other_user}","gists_url":"https://api.github.com/users/jimmidyson/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmidyson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmidyson/subscriptions","organizations_url":"https://api.github.com/users/jimmidyson/orgs","repos_url":"https://api.github.com/users/jimmidyson/repos","events_url":"https://api.github.com/users/jimmidyson/events{/privacy}","received_events_url":"https://api.github.com/users/jimmidyson/received_events","type":"User","site_admin":false},"body":"This seems really fragile. Is this the only way to get this info?","created_at":"2015-12-06T09:20:48Z","updated_at":"2015-12-06T09:20:48Z","html_url":"https://github.com/google/cadvisor/pull/1008#discussion_r46768290","pull_request_url":"https://api.github.com/repos/google/cadvisor/pulls/1008","_links":{"self":{"href":"https://api.github.com/repos/google/cadvisor/pulls/comments/46768290"},"html":{"href":"https://github.com/google/cadvisor/pull/1008#discussion_r46768290"},"pull_request":{"href":"https://api.github.com/repos/google/cadvisor/pulls/1008"}}},"pull_request":{"url":"https://api.github.com/repos/google/cadvisor/pulls/1008","id":52740509,"html_url":"https://github.com/google/cadvisor/pull/1008","diff_url":"https://github.com/google/cadvisor/pull/1008.diff","patch_url":"https://github.com/google/cadvisor/pull/1008.patch","issue_url":"https://api.github.com/repos/google/cadvisor/issues/1008","number":1008,"state":"open","locked":false,"title":"Integration test to track goroutine leaks.","user":{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},"body":"This PR only captures the docker side logic.\r\nWe need to add another test that captures cadvisor as a whole.","created_at":"2015-12-05T00:51:33Z","updated_at":"2015-12-06T09:20:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30ddf07398d76673d2256a0331625d4d787c79d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/cadvisor/pulls/1008/commits","review_comments_url":"https://api.github.com/repos/google/cadvisor/pulls/1008/comments","review_comment_url":"https://api.github.com/repos/google/cadvisor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/cadvisor/issues/1008/comments","statuses_url":"https://api.github.com/repos/google/cadvisor/statuses/8cc528621ccf9e7e2e4a72bff3c4e9a6cdcb9c0b","head":{"label":"vishh:gr-leak","ref":"gr-leak","sha":"8cc528621ccf9e7e2e4a72bff3c4e9a6cdcb9c0b","user":{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},"repo":{"id":20819219,"name":"cadvisor","full_name":"vishh/cadvisor","owner":{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vishh/cadvisor","description":"Analyzes resource usage and performance characteristics of running containers.","fork":true,"url":"https://api.github.com/repos/vishh/cadvisor","forks_url":"https://api.github.com/repos/vishh/cadvisor/forks","keys_url":"https://api.github.com/repos/vishh/cadvisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vishh/cadvisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vishh/cadvisor/teams","hooks_url":"https://api.github.com/repos/vishh/cadvisor/hooks","issue_events_url":"https://api.github.com/repos/vishh/cadvisor/issues/events{/number}","events_url":"https://api.github.com/repos/vishh/cadvisor/events","assignees_url":"https://api.github.com/repos/vishh/cadvisor/assignees{/user}","branches_url":"https://api.github.com/repos/vishh/cadvisor/branches{/branch}","tags_url":"https://api.github.com/repos/vishh/cadvisor/tags","blobs_url":"https://api.github.com/repos/vishh/cadvisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vishh/cadvisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vishh/cadvisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/vishh/cadvisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vishh/cadvisor/statuses/{sha}","languages_url":"https://api.github.com/repos/vishh/cadvisor/languages","stargazers_url":"https://api.github.com/repos/vishh/cadvisor/stargazers","contributors_url":"https://api.github.com/repos/vishh/cadvisor/contributors","subscribers_url":"https://api.github.com/repos/vishh/cadvisor/subscribers","subscription_url":"https://api.github.com/repos/vishh/cadvisor/subscription","commits_url":"https://api.github.com/repos/vishh/cadvisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/vishh/cadvisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/vishh/cadvisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/vishh/cadvisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/vishh/cadvisor/contents/{+path}","compare_url":"https://api.github.com/repos/vishh/cadvisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vishh/cadvisor/merges","archive_url":"https://api.github.com/repos/vishh/cadvisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vishh/cadvisor/downloads","issues_url":"https://api.github.com/repos/vishh/cadvisor/issues{/number}","pulls_url":"https://api.github.com/repos/vishh/cadvisor/pulls{/number}","milestones_url":"https://api.github.com/repos/vishh/cadvisor/milestones{/number}","notifications_url":"https://api.github.com/repos/vishh/cadvisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vishh/cadvisor/labels{/name}","releases_url":"https://api.github.com/repos/vishh/cadvisor/releases{/id}","created_at":"2014-06-13T22:08:05Z","updated_at":"2015-04-17T01:44:15Z","pushed_at":"2015-12-05T00:50:29Z","git_url":"git://github.com/vishh/cadvisor.git","ssh_url":"git@github.com:vishh/cadvisor.git","clone_url":"https://github.com/vishh/cadvisor.git","svn_url":"https://github.com/vishh/cadvisor","homepage":"","size":19060,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"1d2d38d164c187d8613d46b57a15c012dc04afab","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":20653934,"name":"cadvisor","full_name":"google/cadvisor","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/cadvisor","description":"Analyzes resource usage and performance characteristics of running containers.","fork":false,"url":"https://api.github.com/repos/google/cadvisor","forks_url":"https://api.github.com/repos/google/cadvisor/forks","keys_url":"https://api.github.com/repos/google/cadvisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/cadvisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/cadvisor/teams","hooks_url":"https://api.github.com/repos/google/cadvisor/hooks","issue_events_url":"https://api.github.com/repos/google/cadvisor/issues/events{/number}","events_url":"https://api.github.com/repos/google/cadvisor/events","assignees_url":"https://api.github.com/repos/google/cadvisor/assignees{/user}","branches_url":"https://api.github.com/repos/google/cadvisor/branches{/branch}","tags_url":"https://api.github.com/repos/google/cadvisor/tags","blobs_url":"https://api.github.com/repos/google/cadvisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/cadvisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/cadvisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/cadvisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/cadvisor/statuses/{sha}","languages_url":"https://api.github.com/repos/google/cadvisor/languages","stargazers_url":"https://api.github.com/repos/google/cadvisor/stargazers","contributors_url":"https://api.github.com/repos/google/cadvisor/contributors","subscribers_url":"https://api.github.com/repos/google/cadvisor/subscribers","subscription_url":"https://api.github.com/repos/google/cadvisor/subscription","commits_url":"https://api.github.com/repos/google/cadvisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/cadvisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/cadvisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/cadvisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/cadvisor/contents/{+path}","compare_url":"https://api.github.com/repos/google/cadvisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/cadvisor/merges","archive_url":"https://api.github.com/repos/google/cadvisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/cadvisor/downloads","issues_url":"https://api.github.com/repos/google/cadvisor/issues{/number}","pulls_url":"https://api.github.com/repos/google/cadvisor/pulls{/number}","milestones_url":"https://api.github.com/repos/google/cadvisor/milestones{/number}","notifications_url":"https://api.github.com/repos/google/cadvisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/cadvisor/labels{/name}","releases_url":"https://api.github.com/repos/google/cadvisor/releases{/id}","created_at":"2014-06-09T16:36:33Z","updated_at":"2015-12-06T04:48:13Z","pushed_at":"2015-12-05T06:54:54Z","git_url":"git://github.com/google/cadvisor.git","ssh_url":"git@github.com:google/cadvisor.git","clone_url":"https://github.com/google/cadvisor.git","svn_url":"https://github.com/google/cadvisor","homepage":"","size":22913,"stargazers_count":3187,"watchers_count":3187,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":409,"mirror_url":null,"open_issues_count":107,"forks":409,"open_issues":107,"watchers":3187,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/cadvisor/pulls/1008"},"html":{"href":"https://github.com/google/cadvisor/pull/1008"},"issue":{"href":"https://api.github.com/repos/google/cadvisor/issues/1008"},"comments":{"href":"https://api.github.com/repos/google/cadvisor/issues/1008/comments"},"review_comments":{"href":"https://api.github.com/repos/google/cadvisor/pulls/1008/comments"},"review_comment":{"href":"https://api.github.com/repos/google/cadvisor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/cadvisor/pulls/1008/commits"},"statuses":{"href":"https://api.github.com/repos/google/cadvisor/statuses/8cc528621ccf9e7e2e4a72bff3c4e9a6cdcb9c0b"}}}}