{"action":"created","comment":{"url":"https://api.github.com/repos/square/metrics/pulls/comments/36333782","id":36333782,"diff_hunk":"@@ -252,3 +254,150 @@ func TestSeriesFromMetricPoints(t *testing.T) {\n \t\t}\n \t}\n }\n+\n+func TestFullResolutionDataFilling(t *testing.T) {\n+\t// The queries have to be relative to \"now\"\n+\tdefaultClientConfig := Config{\n+\t\t\"https://blueflood.url\",\n+\t\t\"square\",\n+\t\tmake(map[string]int64),\n+\t\ttime.Millisecond,\n+\t\t14400,\n+\t}\n+\n+\tbaseTime := 1438734300000\n+\n+\tregularQueryURL := fmt.Sprintf(\n+\t\t\"https://blueflood.url/v2.0/square/views/some.key.value?from=%d&resolution=MIN5&select=numPoints%%2Caverage&to=%d\",\n+\t\tbaseTime-300*1000*10, // 50 minutes ago\n+\t\tbaseTime-300*1000*3,  // 15 minutes ago\n+\t)\n+\tfmt.Printf(\"expect regular [%s]\\n\", regularQueryURL)","path":"api/backend/blueflood/blueflood_test.go","position":38,"original_position":38,"commit_id":"74be5699485b5e175c6e76eeb2dc369331de6df5","original_commit_id":"74be5699485b5e175c6e76eeb2dc369331de6df5","user":{"login":"achow","id":1609236,"avatar_url":"https://avatars.githubusercontent.com/u/1609236?v=3","gravatar_id":"","url":"https://api.github.com/users/achow","html_url":"https://github.com/achow","followers_url":"https://api.github.com/users/achow/followers","following_url":"https://api.github.com/users/achow/following{/other_user}","gists_url":"https://api.github.com/users/achow/gists{/gist_id}","starred_url":"https://api.github.com/users/achow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achow/subscriptions","organizations_url":"https://api.github.com/users/achow/orgs","repos_url":"https://api.github.com/users/achow/repos","events_url":"https://api.github.com/users/achow/events{/privacy}","received_events_url":"https://api.github.com/users/achow/received_events","type":"User","site_admin":false},"body":"Remove?","created_at":"2015-08-05T18:06:57Z","updated_at":"2015-08-05T18:06:57Z","html_url":"https://github.com/square/metrics/pull/191#discussion_r36333782","pull_request_url":"https://api.github.com/repos/square/metrics/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/square/metrics/pulls/comments/36333782"},"html":{"href":"https://github.com/square/metrics/pull/191#discussion_r36333782"},"pull_request":{"href":"https://api.github.com/repos/square/metrics/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/square/metrics/pulls/191","id":41597330,"html_url":"https://github.com/square/metrics/pull/191","diff_url":"https://github.com/square/metrics/pull/191.diff","patch_url":"https://github.com/square/metrics/pull/191.patch","issue_url":"https://api.github.com/repos/square/metrics/issues/191","number":191,"state":"open","locked":false,"title":"Fill in lower-resolution data with full resolution data","user":{"login":"Nathan-Fenner","id":6179181,"avatar_url":"https://avatars.githubusercontent.com/u/6179181?v=3","gravatar_id":"","url":"https://api.github.com/users/Nathan-Fenner","html_url":"https://github.com/Nathan-Fenner","followers_url":"https://api.github.com/users/Nathan-Fenner/followers","following_url":"https://api.github.com/users/Nathan-Fenner/following{/other_user}","gists_url":"https://api.github.com/users/Nathan-Fenner/gists{/gist_id}","starred_url":"https://api.github.com/users/Nathan-Fenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nathan-Fenner/subscriptions","organizations_url":"https://api.github.com/users/Nathan-Fenner/orgs","repos_url":"https://api.github.com/users/Nathan-Fenner/repos","events_url":"https://api.github.com/users/Nathan-Fenner/events{/privacy}","received_events_url":"https://api.github.com/users/Nathan-Fenner/received_events","type":"User","site_admin":false},"body":"Full resolution data (roughly 30s resolution) is usually available immediately. However, it takes a while for rollups to be performed and therefore lower resolution data (5m, 1hr, 1day) may not be available for a while.\r\n\r\nThis PR adds a feature to fetch full-resolution data to fill this gap in data. The last 4hrs (configurable) of the requested timerange is also fetched from full resolution data. They're combined when bucketing.\r\n\r\nSince the full-resolution data should be sampled down in the same way that rollups are performed, it will look like the regular data is fully available. \r\n\r\nThis essentially doubles the number of fetches required, although the number of points returned is not likely doubled.","created_at":"2015-08-04T17:48:44Z","updated_at":"2015-08-05T18:06:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"034d48cf28aefead9d5e7c8a7a48afa49ac2b32f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/metrics/pulls/191/commits","review_comments_url":"https://api.github.com/repos/square/metrics/pulls/191/comments","review_comment_url":"https://api.github.com/repos/square/metrics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/metrics/issues/191/comments","statuses_url":"https://api.github.com/repos/square/metrics/statuses/74be5699485b5e175c6e76eeb2dc369331de6df5","head":{"label":"square:nathanf-downsample-data","ref":"nathanf-downsample-data","sha":"74be5699485b5e175c6e76eeb2dc369331de6df5","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":34279409,"name":"metrics","full_name":"square/metrics","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/metrics","description":"Metrics Query Engine","fork":false,"url":"https://api.github.com/repos/square/metrics","forks_url":"https://api.github.com/repos/square/metrics/forks","keys_url":"https://api.github.com/repos/square/metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/metrics/teams","hooks_url":"https://api.github.com/repos/square/metrics/hooks","issue_events_url":"https://api.github.com/repos/square/metrics/issues/events{/number}","events_url":"https://api.github.com/repos/square/metrics/events","assignees_url":"https://api.github.com/repos/square/metrics/assignees{/user}","branches_url":"https://api.github.com/repos/square/metrics/branches{/branch}","tags_url":"https://api.github.com/repos/square/metrics/tags","blobs_url":"https://api.github.com/repos/square/metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/square/metrics/languages","stargazers_url":"https://api.github.com/repos/square/metrics/stargazers","contributors_url":"https://api.github.com/repos/square/metrics/contributors","subscribers_url":"https://api.github.com/repos/square/metrics/subscribers","subscription_url":"https://api.github.com/repos/square/metrics/subscription","commits_url":"https://api.github.com/repos/square/metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/metrics/contents/{+path}","compare_url":"https://api.github.com/repos/square/metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/metrics/merges","archive_url":"https://api.github.com/repos/square/metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/metrics/downloads","issues_url":"https://api.github.com/repos/square/metrics/issues{/number}","pulls_url":"https://api.github.com/repos/square/metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/square/metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/square/metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/metrics/labels{/name}","releases_url":"https://api.github.com/repos/square/metrics/releases{/id}","created_at":"2015-04-20T18:43:35Z","updated_at":"2015-07-31T22:02:05Z","pushed_at":"2015-08-05T18:03:35Z","git_url":"git://github.com/square/metrics.git","ssh_url":"git@github.com:square/metrics.git","clone_url":"https://github.com/square/metrics.git","svn_url":"https://github.com/square/metrics","homepage":"","size":4591,"stargazers_count":20,"watchers_count":20,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":20,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"0e2ea8efd167efcaefc7bf76f253f53253b3fde4","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":34279409,"name":"metrics","full_name":"square/metrics","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/metrics","description":"Metrics Query Engine","fork":false,"url":"https://api.github.com/repos/square/metrics","forks_url":"https://api.github.com/repos/square/metrics/forks","keys_url":"https://api.github.com/repos/square/metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/metrics/teams","hooks_url":"https://api.github.com/repos/square/metrics/hooks","issue_events_url":"https://api.github.com/repos/square/metrics/issues/events{/number}","events_url":"https://api.github.com/repos/square/metrics/events","assignees_url":"https://api.github.com/repos/square/metrics/assignees{/user}","branches_url":"https://api.github.com/repos/square/metrics/branches{/branch}","tags_url":"https://api.github.com/repos/square/metrics/tags","blobs_url":"https://api.github.com/repos/square/metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/square/metrics/languages","stargazers_url":"https://api.github.com/repos/square/metrics/stargazers","contributors_url":"https://api.github.com/repos/square/metrics/contributors","subscribers_url":"https://api.github.com/repos/square/metrics/subscribers","subscription_url":"https://api.github.com/repos/square/metrics/subscription","commits_url":"https://api.github.com/repos/square/metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/metrics/contents/{+path}","compare_url":"https://api.github.com/repos/square/metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/metrics/merges","archive_url":"https://api.github.com/repos/square/metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/metrics/downloads","issues_url":"https://api.github.com/repos/square/metrics/issues{/number}","pulls_url":"https://api.github.com/repos/square/metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/square/metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/square/metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/metrics/labels{/name}","releases_url":"https://api.github.com/repos/square/metrics/releases{/id}","created_at":"2015-04-20T18:43:35Z","updated_at":"2015-07-31T22:02:05Z","pushed_at":"2015-08-05T18:03:35Z","git_url":"git://github.com/square/metrics.git","ssh_url":"git@github.com:square/metrics.git","clone_url":"https://github.com/square/metrics.git","svn_url":"https://github.com/square/metrics","homepage":"","size":4591,"stargazers_count":20,"watchers_count":20,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/metrics/pulls/191"},"html":{"href":"https://github.com/square/metrics/pull/191"},"issue":{"href":"https://api.github.com/repos/square/metrics/issues/191"},"comments":{"href":"https://api.github.com/repos/square/metrics/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/square/metrics/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/square/metrics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/metrics/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/square/metrics/statuses/74be5699485b5e175c6e76eeb2dc369331de6df5"}}}}