{"action":"closed","number":5,"pull_request":{"url":"https://api.github.com/repos/Automattic/pinghub/pulls/5","id":66783641,"html_url":"https://github.com/Automattic/pinghub/pull/5","diff_url":"https://github.com/Automattic/pinghub/pull/5.diff","patch_url":"https://github.com/Automattic/pinghub/pull/5.patch","issue_url":"https://api.github.com/repos/Automattic/pinghub/issues/5","number":5,"state":"closed","locked":false,"title":"Single Ticker Per Hub","user":{"login":"mermel","id":705033,"avatar_url":"https://avatars.githubusercontent.com/u/705033?v=3","gravatar_id":"","url":"https://api.github.com/users/mermel","html_url":"https://github.com/mermel","followers_url":"https://api.github.com/users/mermel/followers","following_url":"https://api.github.com/users/mermel/following{/other_user}","gists_url":"https://api.github.com/users/mermel/gists{/gist_id}","starred_url":"https://api.github.com/users/mermel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mermel/subscriptions","organizations_url":"https://api.github.com/users/mermel/orgs","repos_url":"https://api.github.com/users/mermel/repos","events_url":"https://api.github.com/users/mermel/events{/privacy}","received_events_url":"https://api.github.com/users/mermel/received_events","type":"User","site_admin":false},"body":"Change Summary:\r\n1. Remove Ticker form conn.write()\r\n2. Add test to assert connections aren't blocked/locked by inability to access ticker chan.\r\n3. Add package [multitick](https://godoc.org/github.com/VividCortex/multitick)\r\n - multitick allows time chans to 'subscribe' to a ticker on an interval\r\n - it could be something that we might want to self-implement (it's not too complicated) and we may not need the interval\r\n\r\nMemory Savings: \r\nA local benchmark with 12 concurrent connections (9 unique paths–1 path had 3 connections) for 6 ping sessions.  Benchmark yielded the below results:\r\n\r\nMultiple tickers (avg):\r\nAlloc :  631704\r\nTotal Alloc :  631704\r\nSys :  3542140\r\nLookups :  24\r\n\r\nSingle ticker (avg):\r\nAlloc :  629928\r\nTotal Alloc :  629928\r\nSys :  3542140\r\nLookups :  24\r\n\r\nNext Steps:\r\nThis is a change I would merge w/ caution, I was only able to perform a simple benchmark locally but would recommend a more comprehensive load test done in a staging environment. It would be worthwhile to see what the memory savings actually is w/ more load.\r\n\r\n\r\n","created_at":"2016-04-17T22:22:53Z","updated_at":"2016-04-19T17:11:46Z","closed_at":"2016-04-19T17:11:46Z","merged_at":null,"merge_commit_sha":"75d85d5f8741e7f8bdd087828437adde2b95d01f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/pinghub/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Automattic/pinghub/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Automattic/pinghub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/pinghub/issues/5/comments","statuses_url":"https://api.github.com/repos/Automattic/pinghub/statuses/3b2641a4f0512337860e3246afdff6619b3c640d","head":{"label":"Automattic:lauren/single-ticker-conn","ref":"lauren/single-ticker-conn","sha":"3b2641a4f0512337860e3246afdff6619b3c640d","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":46078065,"name":"pinghub","full_name":"Automattic/pinghub","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/pinghub","description":"Pinghub is a simple pubsub message bus for websocket clients.","fork":false,"url":"https://api.github.com/repos/Automattic/pinghub","forks_url":"https://api.github.com/repos/Automattic/pinghub/forks","keys_url":"https://api.github.com/repos/Automattic/pinghub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/pinghub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/pinghub/teams","hooks_url":"https://api.github.com/repos/Automattic/pinghub/hooks","issue_events_url":"https://api.github.com/repos/Automattic/pinghub/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/pinghub/events","assignees_url":"https://api.github.com/repos/Automattic/pinghub/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/pinghub/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/pinghub/tags","blobs_url":"https://api.github.com/repos/Automattic/pinghub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/pinghub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/pinghub/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/pinghub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/pinghub/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/pinghub/languages","stargazers_url":"https://api.github.com/repos/Automattic/pinghub/stargazers","contributors_url":"https://api.github.com/repos/Automattic/pinghub/contributors","subscribers_url":"https://api.github.com/repos/Automattic/pinghub/subscribers","subscription_url":"https://api.github.com/repos/Automattic/pinghub/subscription","commits_url":"https://api.github.com/repos/Automattic/pinghub/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/pinghub/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/pinghub/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/pinghub/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/pinghub/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/pinghub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/pinghub/merges","archive_url":"https://api.github.com/repos/Automattic/pinghub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/pinghub/downloads","issues_url":"https://api.github.com/repos/Automattic/pinghub/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/pinghub/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/pinghub/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/pinghub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/pinghub/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/pinghub/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/pinghub/deployments","created_at":"2015-11-12T20:12:18Z","updated_at":"2016-04-18T10:28:45Z","pushed_at":"2016-04-18T04:00:11Z","git_url":"git://github.com/Automattic/pinghub.git","ssh_url":"git@github.com:Automattic/pinghub.git","clone_url":"https://github.com/Automattic/pinghub.git","svn_url":"https://github.com/Automattic/pinghub","homepage":null,"size":60,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":7,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"26fa494144a0bde1e1807b20c6954cbf48c707b1","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":46078065,"name":"pinghub","full_name":"Automattic/pinghub","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/pinghub","description":"Pinghub is a simple pubsub message bus for websocket clients.","fork":false,"url":"https://api.github.com/repos/Automattic/pinghub","forks_url":"https://api.github.com/repos/Automattic/pinghub/forks","keys_url":"https://api.github.com/repos/Automattic/pinghub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/pinghub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/pinghub/teams","hooks_url":"https://api.github.com/repos/Automattic/pinghub/hooks","issue_events_url":"https://api.github.com/repos/Automattic/pinghub/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/pinghub/events","assignees_url":"https://api.github.com/repos/Automattic/pinghub/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/pinghub/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/pinghub/tags","blobs_url":"https://api.github.com/repos/Automattic/pinghub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/pinghub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/pinghub/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/pinghub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/pinghub/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/pinghub/languages","stargazers_url":"https://api.github.com/repos/Automattic/pinghub/stargazers","contributors_url":"https://api.github.com/repos/Automattic/pinghub/contributors","subscribers_url":"https://api.github.com/repos/Automattic/pinghub/subscribers","subscription_url":"https://api.github.com/repos/Automattic/pinghub/subscription","commits_url":"https://api.github.com/repos/Automattic/pinghub/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/pinghub/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/pinghub/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/pinghub/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/pinghub/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/pinghub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/pinghub/merges","archive_url":"https://api.github.com/repos/Automattic/pinghub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/pinghub/downloads","issues_url":"https://api.github.com/repos/Automattic/pinghub/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/pinghub/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/pinghub/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/pinghub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/pinghub/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/pinghub/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/pinghub/deployments","created_at":"2015-11-12T20:12:18Z","updated_at":"2016-04-18T10:28:45Z","pushed_at":"2016-04-18T04:00:11Z","git_url":"git://github.com/Automattic/pinghub.git","ssh_url":"git@github.com:Automattic/pinghub.git","clone_url":"https://github.com/Automattic/pinghub.git","svn_url":"https://github.com/Automattic/pinghub","homepage":null,"size":60,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/pinghub/pulls/5"},"html":{"href":"https://github.com/Automattic/pinghub/pull/5"},"issue":{"href":"https://api.github.com/repos/Automattic/pinghub/issues/5"},"comments":{"href":"https://api.github.com/repos/Automattic/pinghub/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/pinghub/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/pinghub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/pinghub/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/pinghub/statuses/3b2641a4f0512337860e3246afdff6619b3c640d"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":1,"commits":5,"additions":52,"deletions":11,"changed_files":3}}