{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/50401979","id":50401979,"diff_hunk":"@@ -124,10 +131,16 @@ func Until(f func(), period time.Duration, stopCh <-chan struct{}) {\n \t\t\tdefer HandleCrash()\n \t\t\tf()\n \t\t}()\n+\n+\t\tjitteredPeriod := period\n+\t\tif jitterFactor > 0.0 {","path":"pkg/util/util.go","position":35,"original_position":35,"commit_id":"b2b69b31cdf71280b0dedeeccf8e5d6182ad39d6","original_commit_id":"b2b69b31cdf71280b0dedeeccf8e5d6182ad39d6","user":{"login":"aveshagarwal","id":3596412,"avatar_url":"https://avatars.githubusercontent.com/u/3596412?v=3","gravatar_id":"","url":"https://api.github.com/users/aveshagarwal","html_url":"https://github.com/aveshagarwal","followers_url":"https://api.github.com/users/aveshagarwal/followers","following_url":"https://api.github.com/users/aveshagarwal/following{/other_user}","gists_url":"https://api.github.com/users/aveshagarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/aveshagarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aveshagarwal/subscriptions","organizations_url":"https://api.github.com/users/aveshagarwal/orgs","repos_url":"https://api.github.com/users/aveshagarwal/repos","events_url":"https://api.github.com/users/aveshagarwal/events{/privacy}","received_events_url":"https://api.github.com/users/aveshagarwal/received_events","type":"User","site_admin":false},"body":"what makes jitterFactor > 0.0? or IOW when is this going to be true?","created_at":"2016-01-21T13:49:06Z","updated_at":"2016-01-21T13:49:06Z","html_url":"https://github.com/kubernetes/kubernetes/pull/19917#discussion_r50401979","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/50401979"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/19917#discussion_r50401979"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917","id":56738204,"html_url":"https://github.com/kubernetes/kubernetes/pull/19917","diff_url":"https://github.com/kubernetes/kubernetes/pull/19917.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/19917.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19917","number":19917,"state":"open","locked":false,"title":"jitter period in each run of Until","user":{"login":"ingvagabund","id":8055242,"avatar_url":"https://avatars.githubusercontent.com/u/8055242?v=3","gravatar_id":"","url":"https://api.github.com/users/ingvagabund","html_url":"https://github.com/ingvagabund","followers_url":"https://api.github.com/users/ingvagabund/followers","following_url":"https://api.github.com/users/ingvagabund/following{/other_user}","gists_url":"https://api.github.com/users/ingvagabund/gists{/gist_id}","starred_url":"https://api.github.com/users/ingvagabund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingvagabund/subscriptions","organizations_url":"https://api.github.com/users/ingvagabund/orgs","repos_url":"https://api.github.com/users/ingvagabund/repos","events_url":"https://api.github.com/users/ingvagabund/events{/privacy}","received_events_url":"https://api.github.com/users/ingvagabund/received_events","type":"User","site_admin":false},"body":"In order to synchronize the current state of Kubernetes's objects (e.g. pods, containers, etc.),\r\nperiodic synch loops are run. When there is a lot of objects to synchronize with,\r\nloops increase communication traffic. At some point when all the traffic interfere cpu usage curve\r\nhits the roof causing 100% cpu utilization.\r\n\r\nTo distribute the traffic in time, some sync loops can jitter their period in each loop\r\nand help to flatten the curve.\r\n\r\nThis commit adds JitterUntil function with jitterFactor parameter.\r\nJitterUntil generalizes Until which is a special case for jitterFactor being zero.","created_at":"2016-01-21T11:44:09Z","updated_at":"2016-01-21T13:49:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf6c51a23c4fc91a0e259e06ee9613f44dc9f920","assignee":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19917/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/b2b69b31cdf71280b0dedeeccf8e5d6182ad39d6","head":{"label":"ingvagabund:jitter-until-in-util-package","ref":"jitter-until-in-util-package","sha":"b2b69b31cdf71280b0dedeeccf8e5d6182ad39d6","user":{"login":"ingvagabund","id":8055242,"avatar_url":"https://avatars.githubusercontent.com/u/8055242?v=3","gravatar_id":"","url":"https://api.github.com/users/ingvagabund","html_url":"https://github.com/ingvagabund","followers_url":"https://api.github.com/users/ingvagabund/followers","following_url":"https://api.github.com/users/ingvagabund/following{/other_user}","gists_url":"https://api.github.com/users/ingvagabund/gists{/gist_id}","starred_url":"https://api.github.com/users/ingvagabund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingvagabund/subscriptions","organizations_url":"https://api.github.com/users/ingvagabund/orgs","repos_url":"https://api.github.com/users/ingvagabund/repos","events_url":"https://api.github.com/users/ingvagabund/events{/privacy}","received_events_url":"https://api.github.com/users/ingvagabund/received_events","type":"User","site_admin":false},"repo":{"id":36929310,"name":"kubernetes","full_name":"ingvagabund/kubernetes","owner":{"login":"ingvagabund","id":8055242,"avatar_url":"https://avatars.githubusercontent.com/u/8055242?v=3","gravatar_id":"","url":"https://api.github.com/users/ingvagabund","html_url":"https://github.com/ingvagabund","followers_url":"https://api.github.com/users/ingvagabund/followers","following_url":"https://api.github.com/users/ingvagabund/following{/other_user}","gists_url":"https://api.github.com/users/ingvagabund/gists{/gist_id}","starred_url":"https://api.github.com/users/ingvagabund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingvagabund/subscriptions","organizations_url":"https://api.github.com/users/ingvagabund/orgs","repos_url":"https://api.github.com/users/ingvagabund/repos","events_url":"https://api.github.com/users/ingvagabund/events{/privacy}","received_events_url":"https://api.github.com/users/ingvagabund/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ingvagabund/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/ingvagabund/kubernetes","forks_url":"https://api.github.com/repos/ingvagabund/kubernetes/forks","keys_url":"https://api.github.com/repos/ingvagabund/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ingvagabund/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ingvagabund/kubernetes/teams","hooks_url":"https://api.github.com/repos/ingvagabund/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ingvagabund/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ingvagabund/kubernetes/events","assignees_url":"https://api.github.com/repos/ingvagabund/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ingvagabund/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ingvagabund/kubernetes/tags","blobs_url":"https://api.github.com/repos/ingvagabund/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ingvagabund/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ingvagabund/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ingvagabund/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ingvagabund/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ingvagabund/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ingvagabund/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ingvagabund/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ingvagabund/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ingvagabund/kubernetes/subscription","commits_url":"https://api.github.com/repos/ingvagabund/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ingvagabund/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ingvagabund/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ingvagabund/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ingvagabund/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ingvagabund/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ingvagabund/kubernetes/merges","archive_url":"https://api.github.com/repos/ingvagabund/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ingvagabund/kubernetes/downloads","issues_url":"https://api.github.com/repos/ingvagabund/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ingvagabund/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ingvagabund/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ingvagabund/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ingvagabund/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ingvagabund/kubernetes/releases{/id}","created_at":"2015-06-05T11:30:51Z","updated_at":"2016-01-21T11:18:40Z","pushed_at":"2016-01-21T11:38:32Z","git_url":"git://github.com/ingvagabund/kubernetes.git","ssh_url":"git@github.com:ingvagabund/kubernetes.git","clone_url":"https://github.com/ingvagabund/kubernetes.git","svn_url":"https://github.com/ingvagabund/kubernetes","homepage":"http://kubernetes.io","size":147270,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"0f6f521beb1de54b0edc5be715ac80d5d4af5cd2","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-01-21T12:31:28Z","pushed_at":"2016-01-21T13:36:41Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":306951,"stargazers_count":12262,"watchers_count":12262,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3454,"mirror_url":null,"open_issues_count":2856,"forks":3454,"open_issues":2856,"watchers":12262,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/19917"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/19917"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/19917/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19917/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/b2b69b31cdf71280b0dedeeccf8e5d6182ad39d6"}}}}