{"action":"created","comment":{"url":"https://api.github.com/repos/tomwilkie/prometheus/pulls/comments/75337660","id":75337660,"diff_hunk":"@@ -205,3 +205,20 @@ func (c *MemcacheClient) StoreChunkData(userID string, chunk *wire.Chunk) error\n \t\treturn c.client.Set(&item)\n \t})\n }\n+\n+// StoreChunks serializes and stores multiple chunks in memcache.\n+func (c *MemcacheClient) StoreChunks(userID string, chunks []wire.Chunk) error {\n+\terrs := make(chan error)\n+\tfor _, chunk := range chunks {\n+\t\tgo func(chunk *wire.Chunk) {\n+\t\t\terrs <- c.StoreChunkData(userID, chunk)\n+\t\t}(&chunk)\n+\t}\n+\tvar errOut error\n+\tfor i := 0; i < len(chunks); i++ {\n+\t\tif err := <-errs; err != nil {\n+\t\t\terrOut = err\n+\t\t}","path":"frankenstein/memcache_client.go","position":17,"original_position":17,"commit_id":"9869daa544bbe90dc032af644ed2a9149b67448f","original_commit_id":"9869daa544bbe90dc032af644ed2a9149b67448f","user":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"body":"Could do, but I've not found it to be particularly valuable in the past.  I only collect them all for correctness.","created_at":"2016-08-18T16:05:54Z","updated_at":"2016-08-18T16:05:54Z","html_url":"https://github.com/tomwilkie/prometheus/pull/57#discussion_r75337660","pull_request_url":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/tomwilkie/prometheus/pulls/comments/75337660"},"html":{"href":"https://github.com/tomwilkie/prometheus/pull/57#discussion_r75337660"},"pull_request":{"href":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57","id":81838891,"html_url":"https://github.com/tomwilkie/prometheus/pull/57","diff_url":"https://github.com/tomwilkie/prometheus/pull/57.diff","patch_url":"https://github.com/tomwilkie/prometheus/pull/57.patch","issue_url":"https://api.github.com/repos/tomwilkie/prometheus/issues/57","number":57,"state":"open","locked":false,"title":"Parallelise memcache puts.","user":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-18T15:42:28Z","updated_at":"2016-08-18T16:05:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d13c64b54d8e53316b3fa842c9ad3c57d1994bfa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57/commits","review_comments_url":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57/comments","review_comment_url":"https://api.github.com/repos/tomwilkie/prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomwilkie/prometheus/issues/57/comments","statuses_url":"https://api.github.com/repos/tomwilkie/prometheus/statuses/9869daa544bbe90dc032af644ed2a9149b67448f","head":{"label":"tomwilkie:parallelise-memcache-put","ref":"parallelise-memcache-put","sha":"9869daa544bbe90dc032af644ed2a9149b67448f","user":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"repo":{"id":61650324,"name":"prometheus","full_name":"tomwilkie/prometheus","owner":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomwilkie/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/tomwilkie/prometheus","forks_url":"https://api.github.com/repos/tomwilkie/prometheus/forks","keys_url":"https://api.github.com/repos/tomwilkie/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomwilkie/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomwilkie/prometheus/teams","hooks_url":"https://api.github.com/repos/tomwilkie/prometheus/hooks","issue_events_url":"https://api.github.com/repos/tomwilkie/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/tomwilkie/prometheus/events","assignees_url":"https://api.github.com/repos/tomwilkie/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/tomwilkie/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/tomwilkie/prometheus/tags","blobs_url":"https://api.github.com/repos/tomwilkie/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomwilkie/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomwilkie/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomwilkie/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomwilkie/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/tomwilkie/prometheus/languages","stargazers_url":"https://api.github.com/repos/tomwilkie/prometheus/stargazers","contributors_url":"https://api.github.com/repos/tomwilkie/prometheus/contributors","subscribers_url":"https://api.github.com/repos/tomwilkie/prometheus/subscribers","subscription_url":"https://api.github.com/repos/tomwilkie/prometheus/subscription","commits_url":"https://api.github.com/repos/tomwilkie/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomwilkie/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomwilkie/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomwilkie/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomwilkie/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/tomwilkie/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomwilkie/prometheus/merges","archive_url":"https://api.github.com/repos/tomwilkie/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomwilkie/prometheus/downloads","issues_url":"https://api.github.com/repos/tomwilkie/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/tomwilkie/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/tomwilkie/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/tomwilkie/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomwilkie/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/tomwilkie/prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/tomwilkie/prometheus/deployments","created_at":"2016-06-21T16:41:01Z","updated_at":"2016-06-21T16:41:03Z","pushed_at":"2016-08-18T15:42:35Z","git_url":"git://github.com/tomwilkie/prometheus.git","ssh_url":"git@github.com:tomwilkie/prometheus.git","clone_url":"https://github.com/tomwilkie/prometheus.git","svn_url":"https://github.com/tomwilkie/prometheus","homepage":"https://prometheus.io/","size":12604,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"frankenstein"}},"base":{"label":"tomwilkie:frankenstein","ref":"frankenstein","sha":"4c74aeab4c33769f303ded56bc4b75e4fd37e826","user":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"repo":{"id":61650324,"name":"prometheus","full_name":"tomwilkie/prometheus","owner":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomwilkie/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/tomwilkie/prometheus","forks_url":"https://api.github.com/repos/tomwilkie/prometheus/forks","keys_url":"https://api.github.com/repos/tomwilkie/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomwilkie/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomwilkie/prometheus/teams","hooks_url":"https://api.github.com/repos/tomwilkie/prometheus/hooks","issue_events_url":"https://api.github.com/repos/tomwilkie/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/tomwilkie/prometheus/events","assignees_url":"https://api.github.com/repos/tomwilkie/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/tomwilkie/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/tomwilkie/prometheus/tags","blobs_url":"https://api.github.com/repos/tomwilkie/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomwilkie/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomwilkie/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomwilkie/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomwilkie/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/tomwilkie/prometheus/languages","stargazers_url":"https://api.github.com/repos/tomwilkie/prometheus/stargazers","contributors_url":"https://api.github.com/repos/tomwilkie/prometheus/contributors","subscribers_url":"https://api.github.com/repos/tomwilkie/prometheus/subscribers","subscription_url":"https://api.github.com/repos/tomwilkie/prometheus/subscription","commits_url":"https://api.github.com/repos/tomwilkie/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomwilkie/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomwilkie/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomwilkie/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomwilkie/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/tomwilkie/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomwilkie/prometheus/merges","archive_url":"https://api.github.com/repos/tomwilkie/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomwilkie/prometheus/downloads","issues_url":"https://api.github.com/repos/tomwilkie/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/tomwilkie/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/tomwilkie/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/tomwilkie/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomwilkie/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/tomwilkie/prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/tomwilkie/prometheus/deployments","created_at":"2016-06-21T16:41:01Z","updated_at":"2016-06-21T16:41:03Z","pushed_at":"2016-08-18T15:42:35Z","git_url":"git://github.com/tomwilkie/prometheus.git","ssh_url":"git@github.com:tomwilkie/prometheus.git","clone_url":"https://github.com/tomwilkie/prometheus.git","svn_url":"https://github.com/tomwilkie/prometheus","homepage":"https://prometheus.io/","size":12604,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"frankenstein"}},"_links":{"self":{"href":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57"},"html":{"href":"https://github.com/tomwilkie/prometheus/pull/57"},"issue":{"href":"https://api.github.com/repos/tomwilkie/prometheus/issues/57"},"comments":{"href":"https://api.github.com/repos/tomwilkie/prometheus/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/tomwilkie/prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomwilkie/prometheus/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/tomwilkie/prometheus/statuses/9869daa544bbe90dc032af644ed2a9149b67448f"}}}}
{"actor":{"display_login":"tomwilkie"}}