{"action":"closed","number":74,"pull_request":{"url":"https://api.github.com/repos/weaveworks/cortex/pulls/74","id":90858946,"html_url":"https://github.com/weaveworks/cortex/pull/74","diff_url":"https://github.com/weaveworks/cortex/pull/74.diff","patch_url":"https://github.com/weaveworks/cortex/pull/74.patch","issue_url":"https://api.github.com/repos/weaveworks/cortex/issues/74","number":74,"state":"closed","locked":false,"title":"[WIP] Move time filter to second loop. Randomize.","user":{"login":"jml","id":125674,"avatar_url":"https://avatars.githubusercontent.com/u/125674?v=3","gravatar_id":"","url":"https://api.github.com/users/jml","html_url":"https://github.com/jml","followers_url":"https://api.github.com/users/jml/followers","following_url":"https://api.github.com/users/jml/following{/other_user}","gists_url":"https://api.github.com/users/jml/gists{/gist_id}","starred_url":"https://api.github.com/users/jml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jml/subscriptions","organizations_url":"https://api.github.com/users/jml/orgs","repos_url":"https://api.github.com/users/jml/repos","events_url":"https://api.github.com/users/jml/events{/privacy}","received_events_url":"https://api.github.com/users/jml/received_events","type":"User","site_admin":false},"body":"@tomwilkie and I talked about this in the office. I thought I'd do it to check my own understanding.\n\nI think the existing logic is right, btw. The `continue` happens after `distinctHosts` has been accumulated, so it doesn't cause the list to go past the boundary of the algorithm.\n\nI don't know how to idiomatically shuffle a slice in Go. This seems plausible.\n\nWe should have tests.\n\n<!-- Reviewable:start -->\n\n---\n\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/weaveworks/cortex/74)\n\n<!-- Reviewable:end -->\n","created_at":"2016-10-25T17:56:59Z","updated_at":"2016-11-15T10:52:16Z","closed_at":"2016-11-15T10:52:16Z","merged_at":null,"merge_commit_sha":"01ec262a52df61e61f129e97fffb3e5860bd040b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/weaveworks/cortex/pulls/74/commits","review_comments_url":"https://api.github.com/repos/weaveworks/cortex/pulls/74/comments","review_comment_url":"https://api.github.com/repos/weaveworks/cortex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/cortex/issues/74/comments","statuses_url":"https://api.github.com/repos/weaveworks/cortex/statuses/37cc1fcd3447ddddd0ad0610ca51757b899aa52d","head":{"label":"weaveworks:ring-logic","ref":"ring-logic","sha":"37cc1fcd3447ddddd0ad0610ca51757b899aa52d","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":67793333,"name":"cortex","full_name":"weaveworks/cortex","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/cortex","description":"A multitenant, horizontally scalable Prometheus as a Service","fork":false,"url":"https://api.github.com/repos/weaveworks/cortex","forks_url":"https://api.github.com/repos/weaveworks/cortex/forks","keys_url":"https://api.github.com/repos/weaveworks/cortex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/cortex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/cortex/teams","hooks_url":"https://api.github.com/repos/weaveworks/cortex/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/cortex/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/cortex/events","assignees_url":"https://api.github.com/repos/weaveworks/cortex/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/cortex/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/cortex/tags","blobs_url":"https://api.github.com/repos/weaveworks/cortex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/cortex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/cortex/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/cortex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/cortex/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/cortex/languages","stargazers_url":"https://api.github.com/repos/weaveworks/cortex/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/cortex/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/cortex/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/cortex/subscription","commits_url":"https://api.github.com/repos/weaveworks/cortex/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/cortex/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/cortex/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/cortex/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/cortex/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/cortex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/cortex/merges","archive_url":"https://api.github.com/repos/weaveworks/cortex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/cortex/downloads","issues_url":"https://api.github.com/repos/weaveworks/cortex/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/cortex/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/cortex/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/cortex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/cortex/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/cortex/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/cortex/deployments","created_at":"2016-09-09T11:23:12Z","updated_at":"2016-11-14T13:14:15Z","pushed_at":"2016-11-14T16:03:05Z","git_url":"git://github.com/weaveworks/cortex.git","ssh_url":"git@github.com:weaveworks/cortex.git","clone_url":"https://github.com/weaveworks/cortex.git","svn_url":"https://github.com/weaveworks/cortex","homepage":null,"size":6130,"stargazers_count":37,"watchers_count":37,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":28,"forks":3,"open_issues":28,"watchers":37,"default_branch":"master"}},"base":{"label":"weaveworks:master","ref":"master","sha":"96d884c83ad3d688f4f4cb2e4be66b4fc07bc15e","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":67793333,"name":"cortex","full_name":"weaveworks/cortex","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/cortex","description":"A multitenant, horizontally scalable Prometheus as a Service","fork":false,"url":"https://api.github.com/repos/weaveworks/cortex","forks_url":"https://api.github.com/repos/weaveworks/cortex/forks","keys_url":"https://api.github.com/repos/weaveworks/cortex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/cortex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/cortex/teams","hooks_url":"https://api.github.com/repos/weaveworks/cortex/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/cortex/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/cortex/events","assignees_url":"https://api.github.com/repos/weaveworks/cortex/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/cortex/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/cortex/tags","blobs_url":"https://api.github.com/repos/weaveworks/cortex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/cortex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/cortex/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/cortex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/cortex/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/cortex/languages","stargazers_url":"https://api.github.com/repos/weaveworks/cortex/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/cortex/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/cortex/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/cortex/subscription","commits_url":"https://api.github.com/repos/weaveworks/cortex/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/cortex/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/cortex/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/cortex/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/cortex/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/cortex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/cortex/merges","archive_url":"https://api.github.com/repos/weaveworks/cortex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/cortex/downloads","issues_url":"https://api.github.com/repos/weaveworks/cortex/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/cortex/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/cortex/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/cortex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/cortex/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/cortex/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/cortex/deployments","created_at":"2016-09-09T11:23:12Z","updated_at":"2016-11-14T13:14:15Z","pushed_at":"2016-11-14T16:03:05Z","git_url":"git://github.com/weaveworks/cortex.git","ssh_url":"git@github.com:weaveworks/cortex.git","clone_url":"https://github.com/weaveworks/cortex.git","svn_url":"https://github.com/weaveworks/cortex","homepage":null,"size":6130,"stargazers_count":37,"watchers_count":37,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":28,"forks":3,"open_issues":28,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/74"},"html":{"href":"https://github.com/weaveworks/cortex/pull/74"},"issue":{"href":"https://api.github.com/repos/weaveworks/cortex/issues/74"},"comments":{"href":"https://api.github.com/repos/weaveworks/cortex/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/cortex/statuses/37cc1fcd3447ddddd0ad0610ca51757b899aa52d"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":8,"review_comments":3,"commits":4,"additions":112,"deletions":30,"changed_files":4}}
{"actor":{"display_login":"jml"}}