{"action":"created","comment":{"url":"https://api.github.com/repos/uber-go/fx/pulls/comments/100956488","pull_request_review_id":21672844,"id":100956488,"diff_hunk":"@@ -29,15 +29,20 @@ import (\n \n \t\"github.com/stretchr/testify/assert\"\n \t\"github.com/stretchr/testify/require\"\n+\t\"github.com/uber-go/tally\"\n+\t\"go.uber.org/fx/service\"\n )\n \n var (\n-\t_errorCh <-chan error\n-\t_ctx     = context.Background()\n+\t_testScope tally.Scope\n+\t_errorCh   <-chan error\n+\t_ctx       = context.Background()\n )\n \n func init() {\n-\t_globalBackend = NewInMemBackend()\n+\thost := service.NopHost()\n+\t_testScope = host.Metrics()\n+\t_globalBackend = NewInMemBackend(host)","path":"modules/task/execution_test.go","position":20,"original_position":20,"commit_id":"134bae6db3c53484b4170c8644f28ce678acaf19","original_commit_id":"134bae6db3c53484b4170c8644f28ce678acaf19","user":{"login":"akshayjshah","id":972790,"avatar_url":"https://avatars.githubusercontent.com/u/972790?v=3","gravatar_id":"","url":"https://api.github.com/users/akshayjshah","html_url":"https://github.com/akshayjshah","followers_url":"https://api.github.com/users/akshayjshah/followers","following_url":"https://api.github.com/users/akshayjshah/following{/other_user}","gists_url":"https://api.github.com/users/akshayjshah/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayjshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayjshah/subscriptions","organizations_url":"https://api.github.com/users/akshayjshah/orgs","repos_url":"https://api.github.com/users/akshayjshah/repos","events_url":"https://api.github.com/users/akshayjshah/events{/privacy}","received_events_url":"https://api.github.com/users/akshayjshah/received_events","type":"User","site_admin":false},"body":"The *tests* need global state? I don't see you resetting state, so it looks like you can't make substantive assertions about these metrics. Again, these would be much less awkward if they weren't globals.","created_at":"2017-02-14T04:00:02Z","updated_at":"2017-02-14T04:37:44Z","html_url":"https://github.com/uber-go/fx/pull/229#discussion_r100956488","pull_request_url":"https://api.github.com/repos/uber-go/fx/pulls/229","_links":{"self":{"href":"https://api.github.com/repos/uber-go/fx/pulls/comments/100956488"},"html":{"href":"https://github.com/uber-go/fx/pull/229#discussion_r100956488"},"pull_request":{"href":"https://api.github.com/repos/uber-go/fx/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/uber-go/fx/pulls/229","id":105317911,"html_url":"https://github.com/uber-go/fx/pull/229","diff_url":"https://github.com/uber-go/fx/pull/229.diff","patch_url":"https://github.com/uber-go/fx/pull/229.patch","issue_url":"https://api.github.com/repos/uber-go/fx/issues/229","number":229,"state":"closed","locked":false,"title":"Added useful metrics for fx modules","user":{"login":"anuptalwalkar","id":11004015,"avatar_url":"https://avatars.githubusercontent.com/u/11004015?v=3","gravatar_id":"","url":"https://api.github.com/users/anuptalwalkar","html_url":"https://github.com/anuptalwalkar","followers_url":"https://api.github.com/users/anuptalwalkar/followers","following_url":"https://api.github.com/users/anuptalwalkar/following{/other_user}","gists_url":"https://api.github.com/users/anuptalwalkar/gists{/gist_id}","starred_url":"https://api.github.com/users/anuptalwalkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuptalwalkar/subscriptions","organizations_url":"https://api.github.com/users/anuptalwalkar/orgs","repos_url":"https://api.github.com/users/anuptalwalkar/repos","events_url":"https://api.github.com/users/anuptalwalkar/events{/privacy}","received_events_url":"https://api.github.com/users/anuptalwalkar/received_events","type":"User","site_admin":false},"body":"Moved metrics to static initialization to save on allocs","created_at":"2017-02-08T22:18:04Z","updated_at":"2017-02-14T04:37:44Z","closed_at":"2017-02-10T19:25:08Z","merged_at":"2017-02-10T19:25:08Z","merge_commit_sha":"7ba29954056f635e2ceb9f7cbbe1a82d83ca570a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uber-go/fx/pulls/229/commits","review_comments_url":"https://api.github.com/repos/uber-go/fx/pulls/229/comments","review_comment_url":"https://api.github.com/repos/uber-go/fx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber-go/fx/issues/229/comments","statuses_url":"https://api.github.com/repos/uber-go/fx/statuses/134bae6db3c53484b4170c8644f28ce678acaf19","head":{"label":"uber-go:more-metrics","ref":"more-metrics","sha":"134bae6db3c53484b4170c8644f28ce678acaf19","user":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"repo":{"id":72056048,"name":"fx","full_name":"uber-go/fx","owner":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-go/fx","description":"[ALPHA QUALITY] Service Framework","fork":false,"url":"https://api.github.com/repos/uber-go/fx","forks_url":"https://api.github.com/repos/uber-go/fx/forks","keys_url":"https://api.github.com/repos/uber-go/fx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-go/fx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-go/fx/teams","hooks_url":"https://api.github.com/repos/uber-go/fx/hooks","issue_events_url":"https://api.github.com/repos/uber-go/fx/issues/events{/number}","events_url":"https://api.github.com/repos/uber-go/fx/events","assignees_url":"https://api.github.com/repos/uber-go/fx/assignees{/user}","branches_url":"https://api.github.com/repos/uber-go/fx/branches{/branch}","tags_url":"https://api.github.com/repos/uber-go/fx/tags","blobs_url":"https://api.github.com/repos/uber-go/fx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-go/fx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-go/fx/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-go/fx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-go/fx/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-go/fx/languages","stargazers_url":"https://api.github.com/repos/uber-go/fx/stargazers","contributors_url":"https://api.github.com/repos/uber-go/fx/contributors","subscribers_url":"https://api.github.com/repos/uber-go/fx/subscribers","subscription_url":"https://api.github.com/repos/uber-go/fx/subscription","commits_url":"https://api.github.com/repos/uber-go/fx/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-go/fx/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-go/fx/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-go/fx/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-go/fx/contents/{+path}","compare_url":"https://api.github.com/repos/uber-go/fx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-go/fx/merges","archive_url":"https://api.github.com/repos/uber-go/fx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-go/fx/downloads","issues_url":"https://api.github.com/repos/uber-go/fx/issues{/number}","pulls_url":"https://api.github.com/repos/uber-go/fx/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-go/fx/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-go/fx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-go/fx/labels{/name}","releases_url":"https://api.github.com/repos/uber-go/fx/releases{/id}","deployments_url":"https://api.github.com/repos/uber-go/fx/deployments","created_at":"2016-10-27T00:25:00Z","updated_at":"2017-02-08T20:39:17Z","pushed_at":"2017-02-14T04:12:26Z","git_url":"git://github.com/uber-go/fx.git","ssh_url":"git@github.com:uber-go/fx.git","clone_url":"https://github.com/uber-go/fx.git","svn_url":"https://github.com/uber-go/fx","homepage":null,"size":811,"stargazers_count":33,"watchers_count":33,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":17,"forks":7,"open_issues":17,"watchers":33,"default_branch":"master"}},"base":{"label":"uber-go:master","ref":"master","sha":"7f381904c52966d90cf7521e0a06cc4dbc2f93dc","user":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"repo":{"id":72056048,"name":"fx","full_name":"uber-go/fx","owner":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-go/fx","description":"[ALPHA QUALITY] Service Framework","fork":false,"url":"https://api.github.com/repos/uber-go/fx","forks_url":"https://api.github.com/repos/uber-go/fx/forks","keys_url":"https://api.github.com/repos/uber-go/fx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-go/fx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-go/fx/teams","hooks_url":"https://api.github.com/repos/uber-go/fx/hooks","issue_events_url":"https://api.github.com/repos/uber-go/fx/issues/events{/number}","events_url":"https://api.github.com/repos/uber-go/fx/events","assignees_url":"https://api.github.com/repos/uber-go/fx/assignees{/user}","branches_url":"https://api.github.com/repos/uber-go/fx/branches{/branch}","tags_url":"https://api.github.com/repos/uber-go/fx/tags","blobs_url":"https://api.github.com/repos/uber-go/fx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-go/fx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-go/fx/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-go/fx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-go/fx/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-go/fx/languages","stargazers_url":"https://api.github.com/repos/uber-go/fx/stargazers","contributors_url":"https://api.github.com/repos/uber-go/fx/contributors","subscribers_url":"https://api.github.com/repos/uber-go/fx/subscribers","subscription_url":"https://api.github.com/repos/uber-go/fx/subscription","commits_url":"https://api.github.com/repos/uber-go/fx/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-go/fx/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-go/fx/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-go/fx/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-go/fx/contents/{+path}","compare_url":"https://api.github.com/repos/uber-go/fx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-go/fx/merges","archive_url":"https://api.github.com/repos/uber-go/fx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-go/fx/downloads","issues_url":"https://api.github.com/repos/uber-go/fx/issues{/number}","pulls_url":"https://api.github.com/repos/uber-go/fx/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-go/fx/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-go/fx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-go/fx/labels{/name}","releases_url":"https://api.github.com/repos/uber-go/fx/releases{/id}","deployments_url":"https://api.github.com/repos/uber-go/fx/deployments","created_at":"2016-10-27T00:25:00Z","updated_at":"2017-02-08T20:39:17Z","pushed_at":"2017-02-14T04:12:26Z","git_url":"git://github.com/uber-go/fx.git","ssh_url":"git@github.com:uber-go/fx.git","clone_url":"https://github.com/uber-go/fx.git","svn_url":"https://github.com/uber-go/fx","homepage":null,"size":811,"stargazers_count":33,"watchers_count":33,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":17,"forks":7,"open_issues":17,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber-go/fx/pulls/229"},"html":{"href":"https://github.com/uber-go/fx/pull/229"},"issue":{"href":"https://api.github.com/repos/uber-go/fx/issues/229"},"comments":{"href":"https://api.github.com/repos/uber-go/fx/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/uber-go/fx/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/uber-go/fx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber-go/fx/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/uber-go/fx/statuses/134bae6db3c53484b4170c8644f28ce678acaf19"}}}}
{"actor":{"display_login":"akshayjshah"}}