{"action":"created","comment":{"url":"https://api.github.com/repos/uber/ringpop-go/pulls/comments/52279426","id":52279426,"diff_hunk":"@@ -177,8 +197,38 @@ func IdentityResolverFunc(resolver IdentityResolver) Option {\n \t}\n }\n \n+// RingChecksumStatPeriod configures the period between emissions of the stat\n+// 'ring.checksum-periodic'. Using a value <=0 (or RingChecksumStatPeriodNever)\n+// will disable emission of this stat. Using a value in (0, 10ms) will return\n+// an error, as that value is unrealistically small. Normal values must\n+// therefore be >=10ms. RingChecksumStatPeriodDefault defines the default.\n+func RingChecksumStatPeriod(period time.Duration) Option {\n+\treturn func(r *Ringpop) error {\n+\t\tif period <= 0 {\n+\t\t\tperiod = RingChecksumStatPeriodNever\n+\t\t} else if period < 10*time.Millisecond {\n+\t\t\treturn errors.New(\"RingChecksumStatPeriod invalid below 10 ms\")\n+\t\t}\n+\t\tr.config.RingChecksumStatPeriod = period\n+\t\treturn nil\n+\t}\n+}\n+\n // Default options\n \n+// RingChecksumStatPeriodNever defines a \"period\" which disables\n+// ring.checksum-periodic stat emission.\n+const RingChecksumStatPeriodNever = time.Duration(-1)","path":"options.go","position":null,"original_position":67,"commit_id":"204ef1f30a2594685de878a084c9ccd8e0e2427e","original_commit_id":"f9bcca92b6b9612a8399594c67242413ebbc71f7","user":{"login":"benfleis","id":2185001,"avatar_url":"https://avatars.githubusercontent.com/u/2185001?v=3","gravatar_id":"","url":"https://api.github.com/users/benfleis","html_url":"https://github.com/benfleis","followers_url":"https://api.github.com/users/benfleis/followers","following_url":"https://api.github.com/users/benfleis/following{/other_user}","gists_url":"https://api.github.com/users/benfleis/gists{/gist_id}","starred_url":"https://api.github.com/users/benfleis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benfleis/subscriptions","organizations_url":"https://api.github.com/users/benfleis/orgs","repos_url":"https://api.github.com/users/benfleis/repos","events_url":"https://api.github.com/users/benfleis/events{/privacy}","received_events_url":"https://api.github.com/users/benfleis/received_events","type":"User","site_admin":false},"body":"0 is a magic number, even if a common one. You can use any value <= 0, and it will work just fine. Our code ought to use symbolic constants instead of magic numbers wherever possible; clients/users can do it as desired.\r\n\r\nI corrected the original use of 0 in the code, replacing it with the symbol. The rest I will leave as-is.","created_at":"2016-02-09T08:40:46Z","updated_at":"2016-02-09T08:40:46Z","html_url":"https://github.com/uber/ringpop-go/pull/92#discussion_r52279426","pull_request_url":"https://api.github.com/repos/uber/ringpop-go/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/uber/ringpop-go/pulls/comments/52279426"},"html":{"href":"https://github.com/uber/ringpop-go/pull/92#discussion_r52279426"},"pull_request":{"href":"https://api.github.com/repos/uber/ringpop-go/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/uber/ringpop-go/pulls/92","id":58400645,"html_url":"https://github.com/uber/ringpop-go/pull/92","diff_url":"https://github.com/uber/ringpop-go/pull/92.diff","patch_url":"https://github.com/uber/ringpop-go/pull/92.patch","issue_url":"https://api.github.com/repos/uber/ringpop-go/issues/92","number":92,"state":"open","locked":false,"title":"add ring.checksum* stats for partition detection","user":{"login":"benfleis","id":2185001,"avatar_url":"https://avatars.githubusercontent.com/u/2185001?v=3","gravatar_id":"","url":"https://api.github.com/users/benfleis","html_url":"https://github.com/benfleis","followers_url":"https://api.github.com/users/benfleis/followers","following_url":"https://api.github.com/users/benfleis/following{/other_user}","gists_url":"https://api.github.com/users/benfleis/gists{/gist_id}","starred_url":"https://api.github.com/users/benfleis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benfleis/subscriptions","organizations_url":"https://api.github.com/users/benfleis/orgs","repos_url":"https://api.github.com/users/benfleis/repos","events_url":"https://api.github.com/users/benfleis/events{/privacy}","received_events_url":"https://api.github.com/users/benfleis/received_events","type":"User","site_admin":false},"body":"This adds 2 stats useful in external partition detection/monitoring.\r\n\r\n@uber/ringpop ","created_at":"2016-02-05T08:31:11Z","updated_at":"2016-02-09T08:40:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0841a55bf1b654d571a466a123c47961669490be","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/ringpop-go/pulls/92/commits","review_comments_url":"https://api.github.com/repos/uber/ringpop-go/pulls/92/comments","review_comment_url":"https://api.github.com/repos/uber/ringpop-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/ringpop-go/issues/92/comments","statuses_url":"https://api.github.com/repos/uber/ringpop-go/statuses/204ef1f30a2594685de878a084c9ccd8e0e2427e","head":{"label":"uber:feature/emit-ring.checksum","ref":"feature/emit-ring.checksum","sha":"204ef1f30a2594685de878a084c9ccd8e0e2427e","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":36959143,"name":"ringpop-go","full_name":"uber/ringpop-go","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/ringpop-go","description":"Scalable, fault-tolerant application-layer sharding for Go applications","fork":false,"url":"https://api.github.com/repos/uber/ringpop-go","forks_url":"https://api.github.com/repos/uber/ringpop-go/forks","keys_url":"https://api.github.com/repos/uber/ringpop-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/ringpop-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/ringpop-go/teams","hooks_url":"https://api.github.com/repos/uber/ringpop-go/hooks","issue_events_url":"https://api.github.com/repos/uber/ringpop-go/issues/events{/number}","events_url":"https://api.github.com/repos/uber/ringpop-go/events","assignees_url":"https://api.github.com/repos/uber/ringpop-go/assignees{/user}","branches_url":"https://api.github.com/repos/uber/ringpop-go/branches{/branch}","tags_url":"https://api.github.com/repos/uber/ringpop-go/tags","blobs_url":"https://api.github.com/repos/uber/ringpop-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/ringpop-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/ringpop-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/ringpop-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/ringpop-go/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/ringpop-go/languages","stargazers_url":"https://api.github.com/repos/uber/ringpop-go/stargazers","contributors_url":"https://api.github.com/repos/uber/ringpop-go/contributors","subscribers_url":"https://api.github.com/repos/uber/ringpop-go/subscribers","subscription_url":"https://api.github.com/repos/uber/ringpop-go/subscription","commits_url":"https://api.github.com/repos/uber/ringpop-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/ringpop-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/ringpop-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/ringpop-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/ringpop-go/contents/{+path}","compare_url":"https://api.github.com/repos/uber/ringpop-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/ringpop-go/merges","archive_url":"https://api.github.com/repos/uber/ringpop-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/ringpop-go/downloads","issues_url":"https://api.github.com/repos/uber/ringpop-go/issues{/number}","pulls_url":"https://api.github.com/repos/uber/ringpop-go/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/ringpop-go/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/ringpop-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/ringpop-go/labels{/name}","releases_url":"https://api.github.com/repos/uber/ringpop-go/releases{/id}","deployments_url":"https://api.github.com/repos/uber/ringpop-go/deployments","created_at":"2015-06-05T22:48:53Z","updated_at":"2016-02-05T15:31:21Z","pushed_at":"2016-02-08T18:26:11Z","git_url":"git://github.com/uber/ringpop-go.git","ssh_url":"git@github.com:uber/ringpop-go.git","clone_url":"https://github.com/uber/ringpop-go.git","svn_url":"https://github.com/uber/ringpop-go","homepage":"http://www.uber.com","size":2351,"stargazers_count":50,"watchers_count":50,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":50,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"611deec4c5d704bf75fa845509520f1f13a45b72","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":36959143,"name":"ringpop-go","full_name":"uber/ringpop-go","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/ringpop-go","description":"Scalable, fault-tolerant application-layer sharding for Go applications","fork":false,"url":"https://api.github.com/repos/uber/ringpop-go","forks_url":"https://api.github.com/repos/uber/ringpop-go/forks","keys_url":"https://api.github.com/repos/uber/ringpop-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/ringpop-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/ringpop-go/teams","hooks_url":"https://api.github.com/repos/uber/ringpop-go/hooks","issue_events_url":"https://api.github.com/repos/uber/ringpop-go/issues/events{/number}","events_url":"https://api.github.com/repos/uber/ringpop-go/events","assignees_url":"https://api.github.com/repos/uber/ringpop-go/assignees{/user}","branches_url":"https://api.github.com/repos/uber/ringpop-go/branches{/branch}","tags_url":"https://api.github.com/repos/uber/ringpop-go/tags","blobs_url":"https://api.github.com/repos/uber/ringpop-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/ringpop-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/ringpop-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/ringpop-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/ringpop-go/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/ringpop-go/languages","stargazers_url":"https://api.github.com/repos/uber/ringpop-go/stargazers","contributors_url":"https://api.github.com/repos/uber/ringpop-go/contributors","subscribers_url":"https://api.github.com/repos/uber/ringpop-go/subscribers","subscription_url":"https://api.github.com/repos/uber/ringpop-go/subscription","commits_url":"https://api.github.com/repos/uber/ringpop-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/ringpop-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/ringpop-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/ringpop-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/ringpop-go/contents/{+path}","compare_url":"https://api.github.com/repos/uber/ringpop-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/ringpop-go/merges","archive_url":"https://api.github.com/repos/uber/ringpop-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/ringpop-go/downloads","issues_url":"https://api.github.com/repos/uber/ringpop-go/issues{/number}","pulls_url":"https://api.github.com/repos/uber/ringpop-go/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/ringpop-go/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/ringpop-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/ringpop-go/labels{/name}","releases_url":"https://api.github.com/repos/uber/ringpop-go/releases{/id}","deployments_url":"https://api.github.com/repos/uber/ringpop-go/deployments","created_at":"2015-06-05T22:48:53Z","updated_at":"2016-02-05T15:31:21Z","pushed_at":"2016-02-08T18:26:11Z","git_url":"git://github.com/uber/ringpop-go.git","ssh_url":"git@github.com:uber/ringpop-go.git","clone_url":"https://github.com/uber/ringpop-go.git","svn_url":"https://github.com/uber/ringpop-go","homepage":"http://www.uber.com","size":2351,"stargazers_count":50,"watchers_count":50,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/ringpop-go/pulls/92"},"html":{"href":"https://github.com/uber/ringpop-go/pull/92"},"issue":{"href":"https://api.github.com/repos/uber/ringpop-go/issues/92"},"comments":{"href":"https://api.github.com/repos/uber/ringpop-go/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/ringpop-go/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/ringpop-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/ringpop-go/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/uber/ringpop-go/statuses/204ef1f30a2594685de878a084c9ccd8e0e2427e"}}}}