{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/31838707","id":31838707,"diff_hunk":"@@ -59,6 +60,20 @@ void Timepoint2Timespec(const system_clock::time_point& from,\n   to->tv_nsec = nsecs.count();\n }\n \n+void TimepointHR2Timespec(const high_resolution_clock::time_point& from,\n+                          gpr_timespec* to) {\n+  high_resolution_clock::duration deadline = from.time_since_epoch();\n+  seconds secs = duration_cast<seconds>(deadline);\n+  if (from == high_resolution_clock::time_point::max() ||\n+      secs.count() >= gpr_inf_future.tv_sec || secs.count() < 0) {\n+    *to = gpr_inf_future;\n+    return;\n+  }\n+  nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs);","path":"src/cpp/util/time.cc","position":21,"original_position":21,"commit_id":"36403af71e131cb6334a45617035db9c322ac608","original_commit_id":"fcedc150820e896e82e428af074d6ee8c106b69c","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"body":"Yeah, agreed. I feel we don't use const as much as we should.","created_at":"2015-06-05T18:29:42Z","updated_at":"2015-06-05T18:29:42Z","html_url":"https://github.com/grpc/grpc/pull/1948#discussion_r31838707","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/1948","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/31838707"},"html":{"href":"https://github.com/grpc/grpc/pull/1948#discussion_r31838707"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/1948"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/1948","id":37019471,"html_url":"https://github.com/grpc/grpc/pull/1948","diff_url":"https://github.com/grpc/grpc/pull/1948.diff","patch_url":"https://github.com/grpc/grpc/pull/1948.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/1948","number":1948,"state":"open","locked":false,"title":"Open loop sync/async multithreaded testing","user":{"login":"vjpai","id":8864912,"avatar_url":"https://avatars.githubusercontent.com/u/8864912?v=3","gravatar_id":"","url":"https://api.github.com/users/vjpai","html_url":"https://github.com/vjpai","followers_url":"https://api.github.com/users/vjpai/followers","following_url":"https://api.github.com/users/vjpai/following{/other_user}","gists_url":"https://api.github.com/users/vjpai/gists{/gist_id}","starred_url":"https://api.github.com/users/vjpai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjpai/subscriptions","organizations_url":"https://api.github.com/users/vjpai/orgs","repos_url":"https://api.github.com/users/vjpai/repos","events_url":"https://api.github.com/users/vjpai/events{/privacy}","received_events_url":"https://api.github.com/users/vjpai/received_events","type":"User","site_admin":false},"body":"This PR adds the ability to do open-loop testing with various random distributions (though only Poisson makes a lot of sense). You can specify the rate as a load parameter, and the client config proto is expanded accordingly.\r\n\r\nNote that using open-loop testing effectively will typically require you to set a greater value for outstanding_rpcs_per_channel than you would with closed loop, as you need some slack to make up for times when the channels aren't able to keep up with natural variations in the random distribution.\r\n\r\nWhat's not supported: benchmarking for open-loop async streaming. This is an uncommonly used method of communication, so there wasn't a strong desire to incorporate the additional complexity required to benchmark it.\r\n","created_at":"2015-06-05T10:36:35Z","updated_at":"2015-06-05T18:29:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0d7ba71aae34905126a2c7f23f4bbc4078808af","assignee":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/1948/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/1948/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/1948/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/36403af71e131cb6334a45617035db9c322ac608","head":{"label":"vjpai:poisson","ref":"poisson","sha":"36403af71e131cb6334a45617035db9c322ac608","user":{"login":"vjpai","id":8864912,"avatar_url":"https://avatars.githubusercontent.com/u/8864912?v=3","gravatar_id":"","url":"https://api.github.com/users/vjpai","html_url":"https://github.com/vjpai","followers_url":"https://api.github.com/users/vjpai/followers","following_url":"https://api.github.com/users/vjpai/following{/other_user}","gists_url":"https://api.github.com/users/vjpai/gists{/gist_id}","starred_url":"https://api.github.com/users/vjpai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjpai/subscriptions","organizations_url":"https://api.github.com/users/vjpai/orgs","repos_url":"https://api.github.com/users/vjpai/repos","events_url":"https://api.github.com/users/vjpai/events{/privacy}","received_events_url":"https://api.github.com/users/vjpai/received_events","type":"User","site_admin":false},"repo":{"id":32999319,"name":"grpc","full_name":"vjpai/grpc","owner":{"login":"vjpai","id":8864912,"avatar_url":"https://avatars.githubusercontent.com/u/8864912?v=3","gravatar_id":"","url":"https://api.github.com/users/vjpai","html_url":"https://github.com/vjpai","followers_url":"https://api.github.com/users/vjpai/followers","following_url":"https://api.github.com/users/vjpai/following{/other_user}","gists_url":"https://api.github.com/users/vjpai/gists{/gist_id}","starred_url":"https://api.github.com/users/vjpai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjpai/subscriptions","organizations_url":"https://api.github.com/users/vjpai/orgs","repos_url":"https://api.github.com/users/vjpai/repos","events_url":"https://api.github.com/users/vjpai/events{/privacy}","received_events_url":"https://api.github.com/users/vjpai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vjpai/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/vjpai/grpc","forks_url":"https://api.github.com/repos/vjpai/grpc/forks","keys_url":"https://api.github.com/repos/vjpai/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vjpai/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vjpai/grpc/teams","hooks_url":"https://api.github.com/repos/vjpai/grpc/hooks","issue_events_url":"https://api.github.com/repos/vjpai/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/vjpai/grpc/events","assignees_url":"https://api.github.com/repos/vjpai/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/vjpai/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/vjpai/grpc/tags","blobs_url":"https://api.github.com/repos/vjpai/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vjpai/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vjpai/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/vjpai/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vjpai/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/vjpai/grpc/languages","stargazers_url":"https://api.github.com/repos/vjpai/grpc/stargazers","contributors_url":"https://api.github.com/repos/vjpai/grpc/contributors","subscribers_url":"https://api.github.com/repos/vjpai/grpc/subscribers","subscription_url":"https://api.github.com/repos/vjpai/grpc/subscription","commits_url":"https://api.github.com/repos/vjpai/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/vjpai/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/vjpai/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/vjpai/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/vjpai/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/vjpai/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vjpai/grpc/merges","archive_url":"https://api.github.com/repos/vjpai/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vjpai/grpc/downloads","issues_url":"https://api.github.com/repos/vjpai/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/vjpai/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/vjpai/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/vjpai/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vjpai/grpc/labels{/name}","releases_url":"https://api.github.com/repos/vjpai/grpc/releases{/id}","created_at":"2015-03-27T17:16:53Z","updated_at":"2015-05-07T16:51:36Z","pushed_at":"2015-06-05T18:19:18Z","git_url":"git://github.com/vjpai/grpc.git","ssh_url":"git@github.com:vjpai/grpc.git","clone_url":"https://github.com/vjpai/grpc.git","svn_url":"https://github.com/vjpai/grpc","homepage":"","size":31377,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"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":"grpc:master","ref":"master","sha":"b15d37a3c8382d156bae89466d2cef32d668253e","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"name":"grpc","full_name":"grpc/grpc","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","created_at":"2014-12-08T18:58:53Z","updated_at":"2015-06-05T12:14:31Z","pushed_at":"2015-06-05T18:19:19Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"","size":60169,"stargazers_count":2673,"watchers_count":2673,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":363,"mirror_url":null,"open_issues_count":264,"forks":363,"open_issues":264,"watchers":2673,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/1948"},"html":{"href":"https://github.com/grpc/grpc/pull/1948"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/1948"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/1948/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/1948/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/1948/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/36403af71e131cb6334a45617035db9c322ac608"}}}}