{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments/73196662","id":73196662,"diff_hunk":"@@ -45,11 +49,38 @@\n   /** Constant <code>LOG</code> */\n   protected static final Logger LOG = new Logger(ChannelPool.class);\n \n+  private static final AtomicInteger ChannelIdGenerator = new AtomicInteger();\n+\n+  /**\n+   * Best effort counter of active channels. There may be some cases where channel termination\n+   * counting may not accurately be decremented.\n+   */\n+  protected static Counter ACTIVE_CHANNEL_COUNTER;\n+\n+  protected synchronized static Counter getActiveChannelCounter() {\n+    if (ACTIVE_CHANNEL_COUNTER == null) {","path":"bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/ChannelPool.java","position":35,"original_position":35,"commit_id":"ffe940b2ee2274d822b24bf1494f89a5ca53f44d","original_commit_id":"ffe940b2ee2274d822b24bf1494f89a5ca53f44d","user":{"login":"rameshdharan","id":517036,"avatar_url":"https://avatars.githubusercontent.com/u/517036?v=3","gravatar_id":"","url":"https://api.github.com/users/rameshdharan","html_url":"https://github.com/rameshdharan","followers_url":"https://api.github.com/users/rameshdharan/followers","following_url":"https://api.github.com/users/rameshdharan/following{/other_user}","gists_url":"https://api.github.com/users/rameshdharan/gists{/gist_id}","starred_url":"https://api.github.com/users/rameshdharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rameshdharan/subscriptions","organizations_url":"https://api.github.com/users/rameshdharan/orgs","repos_url":"https://api.github.com/users/rameshdharan/repos","events_url":"https://api.github.com/users/rameshdharan/events{/privacy}","received_events_url":"https://api.github.com/users/rameshdharan/received_events","type":"User","site_admin":false},"body":"Curious, why not just initialize in the ChannelPool constructor rather than lazily? \r\n\r\nIs it because you want to avoid the initialization in the case where the metrics stuff is turned off?","created_at":"2016-08-02T17:10:46Z","updated_at":"2016-08-02T17:10:46Z","html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/936#discussion_r73196662","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments/73196662"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/936#discussion_r73196662"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936","id":79769623,"html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/936","diff_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/936.diff","patch_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/936.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/936","number":936,"state":"open","locked":false,"title":"Adding active channel count and per channel latency metrics.","user":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-02T16:49:46Z","updated_at":"2016-08-02T17:10:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab820f9d8c6c135071ea20fb77559486b234f920","assignee":{"login":"rameshdharan","id":517036,"avatar_url":"https://avatars.githubusercontent.com/u/517036?v=3","gravatar_id":"","url":"https://api.github.com/users/rameshdharan","html_url":"https://github.com/rameshdharan","followers_url":"https://api.github.com/users/rameshdharan/followers","following_url":"https://api.github.com/users/rameshdharan/following{/other_user}","gists_url":"https://api.github.com/users/rameshdharan/gists{/gist_id}","starred_url":"https://api.github.com/users/rameshdharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rameshdharan/subscriptions","organizations_url":"https://api.github.com/users/rameshdharan/orgs","repos_url":"https://api.github.com/users/rameshdharan/repos","events_url":"https://api.github.com/users/rameshdharan/events{/privacy}","received_events_url":"https://api.github.com/users/rameshdharan/received_events","type":"User","site_admin":false},"assignees":[{"login":"rameshdharan","id":517036,"avatar_url":"https://avatars.githubusercontent.com/u/517036?v=3","gravatar_id":"","url":"https://api.github.com/users/rameshdharan","html_url":"https://github.com/rameshdharan","followers_url":"https://api.github.com/users/rameshdharan/followers","following_url":"https://api.github.com/users/rameshdharan/following{/other_user}","gists_url":"https://api.github.com/users/rameshdharan/gists{/gist_id}","starred_url":"https://api.github.com/users/rameshdharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rameshdharan/subscriptions","organizations_url":"https://api.github.com/users/rameshdharan/orgs","repos_url":"https://api.github.com/users/rameshdharan/repos","events_url":"https://api.github.com/users/rameshdharan/events{/privacy}","received_events_url":"https://api.github.com/users/rameshdharan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/936/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/ffe940b2ee2274d822b24bf1494f89a5ca53f44d","head":{"label":"sduskis:channel_stats","ref":"channel_stats","sha":"ffe940b2ee2274d822b24bf1494f89a5ca53f44d","user":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"repo":{"id":35497990,"name":"cloud-bigtable-client","full_name":"sduskis/cloud-bigtable-client","owner":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sduskis/cloud-bigtable-client","description":"HBase client extension to access Google Cloud Bigtable","fork":true,"url":"https://api.github.com/repos/sduskis/cloud-bigtable-client","forks_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/forks","keys_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/teams","hooks_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/hooks","issue_events_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/issues/events{/number}","events_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/events","assignees_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/assignees{/user}","branches_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/branches{/branch}","tags_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/tags","blobs_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/statuses/{sha}","languages_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/languages","stargazers_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/stargazers","contributors_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/contributors","subscribers_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/subscribers","subscription_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/subscription","commits_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/contents/{+path}","compare_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/merges","archive_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/downloads","issues_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/issues{/number}","pulls_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/pulls{/number}","milestones_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/milestones{/number}","notifications_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/labels{/name}","releases_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/releases{/id}","deployments_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/deployments","created_at":"2015-05-12T15:56:54Z","updated_at":"2016-01-11T15:25:19Z","pushed_at":"2016-08-02T16:49:28Z","git_url":"git://github.com/sduskis/cloud-bigtable-client.git","ssh_url":"git@github.com:sduskis/cloud-bigtable-client.git","clone_url":"https://github.com/sduskis/cloud-bigtable-client.git","svn_url":"https://github.com/sduskis/cloud-bigtable-client","homepage":"","size":7073,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"GoogleCloudPlatform:master","ref":"master","sha":"0e003f0687812b5f55fe9e4e8489c3b3cb710c48","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":18442381,"name":"cloud-bigtable-client","full_name":"GoogleCloudPlatform/cloud-bigtable-client","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client","description":"HBase client extension to access Google Cloud Bigtable","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/deployments","created_at":"2014-04-04T14:54:35Z","updated_at":"2016-07-17T12:44:10Z","pushed_at":"2016-08-02T16:49:46Z","git_url":"git://github.com/GoogleCloudPlatform/cloud-bigtable-client.git","ssh_url":"git@github.com:GoogleCloudPlatform/cloud-bigtable-client.git","clone_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client.git","svn_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client","homepage":"","size":14081,"stargazers_count":51,"watchers_count":51,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":21,"forks":50,"open_issues":21,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/936"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/936"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/936/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/936/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/ffe940b2ee2274d822b24bf1494f89a5ca53f44d"}}}}
{"actor":{"display_login":"rameshdharan"}}