{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/8","id":41944931,"html_url":"https://github.com/nshoemaker/nghttp2/pull/8","diff_url":"https://github.com/nshoemaker/nghttp2/pull/8.diff","patch_url":"https://github.com/nshoemaker/nghttp2/pull/8.patch","issue_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues/8","number":8,"state":"open","locked":false,"title":"h2load client timeout options","user":{"login":"nshoemaker","id":6412482,"avatar_url":"https://avatars.githubusercontent.com/u/6412482?v=3","gravatar_id":"","url":"https://api.github.com/users/nshoemaker","html_url":"https://github.com/nshoemaker","followers_url":"https://api.github.com/users/nshoemaker/followers","following_url":"https://api.github.com/users/nshoemaker/following{/other_user}","gists_url":"https://api.github.com/users/nshoemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nshoemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshoemaker/subscriptions","organizations_url":"https://api.github.com/users/nshoemaker/orgs","repos_url":"https://api.github.com/users/nshoemaker/repos","events_url":"https://api.github.com/users/nshoemaker/events{/privacy}","received_events_url":"https://api.github.com/users/nshoemaker/received_events","type":"User","site_admin":false},"body":"It would be nice if h2load could timeout certain connections and close them, rather than waiting indefinitely until they close by themselves. In order to do this, I would like to add two new options to h2load: one to specify a way to timeout a connection after a fixed period of time, and another to timeout a connection if there has been no activity on said connection for a fixed period of time. \r\n\r\nFeature 1 -- active timeout\r\n========\r\nThis new option for h2load will ensure that all connections have a max time they are allowed to be open.\r\n\r\n-T, --connection_active_timeout=N\r\nSpecifies the maximum time that h2load is willing to keep a connection open, regardless of the activity on said connection. N must be a positive integer, specifying the number of seconds to wait. When no timeout value is set (either active or inactive), h2load will keep a connection open indefinitely, waiting for a response.\r\n \r\nAfter the last request is sent on any given connection, the connection will wait --connection_active_timeout seconds before it is closed by h2load. Any timed-out requests will be added to the timeout count.\r\n\r\nFeature 2 -- inactivity timeout\r\n=======\r\nThis new option for h2load allows connections to be timed out after a certain amount of inactivity.\r\n\r\n-N, --connection_inactivity_timeout=<N>\r\nSpecifies the amount of time N that h2load is willing to wait to see activity on a given connection. N must be a positive integer, specifying the number of seconds to wait. When no timeout value is set (either active or inactive), h2load will keep a connection open indefinitely, waiting for a response.\r\n \r\nIf a connection sees no activity within --connection_inactivity_timeout seconds, it will be closed by h2load. Any timed-out requests will be added to the timeout count.\r\n\r\nUsage\r\n=======\r\n```\r\nh2load -r2 -C20 -N2 -T5 https://www.google.com\r\nstarting benchmark...\r\nspawning thread #0: 20 concurrent clients, 20 total requests\r\nProtocol: TLSv1.2\r\nCipher: ECDHE-RSA-AES128-GCM-SHA256\r\n\r\nfinished in 10.11s, 1.87921 req/s, 98.44KB/s\r\nrequests: 20 total, 20 started, 20 done, 19 succeeded, 1 failed, 1 errored\r\nstatus codes: 19 2xx, 0 3xx, 0 4xx, 0 5xx\r\ntraffic: 1019146 bytes total, 10319 bytes headers, 1006669 bytes data\r\n                     min         max         mean         sd        +/- sd\r\ntime for request:    51.98ms     70.07ms     58.85ms      4.83ms    68.42%\r\ntime for connect:    39.40ms     66.75ms     45.64ms      6.72ms    85.00%\r\ntime to 1st byte:    39.53ms     66.85ms     45.74ms      6.73ms    85.00%\r\nrequests timed out:1\r\n```\r\nIn this example, one request is timed out due to inactivity. Only 19 status codes were collected. Had the response header of the timed-out request made it back in time before it was timed out, the status code count would be 20. \r\n\r\nThe timed-out requests will affect all stats that they are able to completely finish--meaning their time for connect, request codes, etc. will be factored into the stats, but time for request will not as the request did not complete fully before it was timed out. \r\n\r\nAdditionally, if the -T or -N option is used, the number of requests timed out will be printed out as a separate line. The number of requests timed out is equal to the number of both inactive and active requests timed out during the test. Timed out requests will count as both failed and errored. \r\n\r\n\r\n\r\n","created_at":"2015-08-08T00:41:37Z","updated_at":"2015-08-08T00:41:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/8/commits","review_comments_url":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/8/comments","review_comment_url":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues/8/comments","statuses_url":"https://api.github.com/repos/nshoemaker/nghttp2/statuses/e1115adcbf23d609cfb06a379c7993599922754e","head":{"label":"nshoemaker:client_timeout","ref":"client_timeout","sha":"e1115adcbf23d609cfb06a379c7993599922754e","user":{"login":"nshoemaker","id":6412482,"avatar_url":"https://avatars.githubusercontent.com/u/6412482?v=3","gravatar_id":"","url":"https://api.github.com/users/nshoemaker","html_url":"https://github.com/nshoemaker","followers_url":"https://api.github.com/users/nshoemaker/followers","following_url":"https://api.github.com/users/nshoemaker/following{/other_user}","gists_url":"https://api.github.com/users/nshoemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nshoemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshoemaker/subscriptions","organizations_url":"https://api.github.com/users/nshoemaker/orgs","repos_url":"https://api.github.com/users/nshoemaker/repos","events_url":"https://api.github.com/users/nshoemaker/events{/privacy}","received_events_url":"https://api.github.com/users/nshoemaker/received_events","type":"User","site_admin":false},"repo":{"id":38848708,"name":"nghttp2","full_name":"nshoemaker/nghttp2","owner":{"login":"nshoemaker","id":6412482,"avatar_url":"https://avatars.githubusercontent.com/u/6412482?v=3","gravatar_id":"","url":"https://api.github.com/users/nshoemaker","html_url":"https://github.com/nshoemaker","followers_url":"https://api.github.com/users/nshoemaker/followers","following_url":"https://api.github.com/users/nshoemaker/following{/other_user}","gists_url":"https://api.github.com/users/nshoemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nshoemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshoemaker/subscriptions","organizations_url":"https://api.github.com/users/nshoemaker/orgs","repos_url":"https://api.github.com/users/nshoemaker/repos","events_url":"https://api.github.com/users/nshoemaker/events{/privacy}","received_events_url":"https://api.github.com/users/nshoemaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nshoemaker/nghttp2","description":"nghttp2 - HTTP/2 C Library","fork":true,"url":"https://api.github.com/repos/nshoemaker/nghttp2","forks_url":"https://api.github.com/repos/nshoemaker/nghttp2/forks","keys_url":"https://api.github.com/repos/nshoemaker/nghttp2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nshoemaker/nghttp2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nshoemaker/nghttp2/teams","hooks_url":"https://api.github.com/repos/nshoemaker/nghttp2/hooks","issue_events_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues/events{/number}","events_url":"https://api.github.com/repos/nshoemaker/nghttp2/events","assignees_url":"https://api.github.com/repos/nshoemaker/nghttp2/assignees{/user}","branches_url":"https://api.github.com/repos/nshoemaker/nghttp2/branches{/branch}","tags_url":"https://api.github.com/repos/nshoemaker/nghttp2/tags","blobs_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nshoemaker/nghttp2/statuses/{sha}","languages_url":"https://api.github.com/repos/nshoemaker/nghttp2/languages","stargazers_url":"https://api.github.com/repos/nshoemaker/nghttp2/stargazers","contributors_url":"https://api.github.com/repos/nshoemaker/nghttp2/contributors","subscribers_url":"https://api.github.com/repos/nshoemaker/nghttp2/subscribers","subscription_url":"https://api.github.com/repos/nshoemaker/nghttp2/subscription","commits_url":"https://api.github.com/repos/nshoemaker/nghttp2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nshoemaker/nghttp2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nshoemaker/nghttp2/contents/{+path}","compare_url":"https://api.github.com/repos/nshoemaker/nghttp2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nshoemaker/nghttp2/merges","archive_url":"https://api.github.com/repos/nshoemaker/nghttp2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nshoemaker/nghttp2/downloads","issues_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues{/number}","pulls_url":"https://api.github.com/repos/nshoemaker/nghttp2/pulls{/number}","milestones_url":"https://api.github.com/repos/nshoemaker/nghttp2/milestones{/number}","notifications_url":"https://api.github.com/repos/nshoemaker/nghttp2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nshoemaker/nghttp2/labels{/name}","releases_url":"https://api.github.com/repos/nshoemaker/nghttp2/releases{/id}","created_at":"2015-07-09T22:34:19Z","updated_at":"2015-07-09T22:34:21Z","pushed_at":"2015-08-08T00:41:37Z","git_url":"git://github.com/nshoemaker/nghttp2.git","ssh_url":"git@github.com:nshoemaker/nghttp2.git","clone_url":"https://github.com/nshoemaker/nghttp2.git","svn_url":"https://github.com/nshoemaker/nghttp2","homepage":"https://nghttp2.org","size":21309,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nshoemaker:master","ref":"master","sha":"69ce12ff1de924a8dac37ba9244088892c23202e","user":{"login":"nshoemaker","id":6412482,"avatar_url":"https://avatars.githubusercontent.com/u/6412482?v=3","gravatar_id":"","url":"https://api.github.com/users/nshoemaker","html_url":"https://github.com/nshoemaker","followers_url":"https://api.github.com/users/nshoemaker/followers","following_url":"https://api.github.com/users/nshoemaker/following{/other_user}","gists_url":"https://api.github.com/users/nshoemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nshoemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshoemaker/subscriptions","organizations_url":"https://api.github.com/users/nshoemaker/orgs","repos_url":"https://api.github.com/users/nshoemaker/repos","events_url":"https://api.github.com/users/nshoemaker/events{/privacy}","received_events_url":"https://api.github.com/users/nshoemaker/received_events","type":"User","site_admin":false},"repo":{"id":38848708,"name":"nghttp2","full_name":"nshoemaker/nghttp2","owner":{"login":"nshoemaker","id":6412482,"avatar_url":"https://avatars.githubusercontent.com/u/6412482?v=3","gravatar_id":"","url":"https://api.github.com/users/nshoemaker","html_url":"https://github.com/nshoemaker","followers_url":"https://api.github.com/users/nshoemaker/followers","following_url":"https://api.github.com/users/nshoemaker/following{/other_user}","gists_url":"https://api.github.com/users/nshoemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nshoemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshoemaker/subscriptions","organizations_url":"https://api.github.com/users/nshoemaker/orgs","repos_url":"https://api.github.com/users/nshoemaker/repos","events_url":"https://api.github.com/users/nshoemaker/events{/privacy}","received_events_url":"https://api.github.com/users/nshoemaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nshoemaker/nghttp2","description":"nghttp2 - HTTP/2 C Library","fork":true,"url":"https://api.github.com/repos/nshoemaker/nghttp2","forks_url":"https://api.github.com/repos/nshoemaker/nghttp2/forks","keys_url":"https://api.github.com/repos/nshoemaker/nghttp2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nshoemaker/nghttp2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nshoemaker/nghttp2/teams","hooks_url":"https://api.github.com/repos/nshoemaker/nghttp2/hooks","issue_events_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues/events{/number}","events_url":"https://api.github.com/repos/nshoemaker/nghttp2/events","assignees_url":"https://api.github.com/repos/nshoemaker/nghttp2/assignees{/user}","branches_url":"https://api.github.com/repos/nshoemaker/nghttp2/branches{/branch}","tags_url":"https://api.github.com/repos/nshoemaker/nghttp2/tags","blobs_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nshoemaker/nghttp2/statuses/{sha}","languages_url":"https://api.github.com/repos/nshoemaker/nghttp2/languages","stargazers_url":"https://api.github.com/repos/nshoemaker/nghttp2/stargazers","contributors_url":"https://api.github.com/repos/nshoemaker/nghttp2/contributors","subscribers_url":"https://api.github.com/repos/nshoemaker/nghttp2/subscribers","subscription_url":"https://api.github.com/repos/nshoemaker/nghttp2/subscription","commits_url":"https://api.github.com/repos/nshoemaker/nghttp2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nshoemaker/nghttp2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nshoemaker/nghttp2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nshoemaker/nghttp2/contents/{+path}","compare_url":"https://api.github.com/repos/nshoemaker/nghttp2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nshoemaker/nghttp2/merges","archive_url":"https://api.github.com/repos/nshoemaker/nghttp2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nshoemaker/nghttp2/downloads","issues_url":"https://api.github.com/repos/nshoemaker/nghttp2/issues{/number}","pulls_url":"https://api.github.com/repos/nshoemaker/nghttp2/pulls{/number}","milestones_url":"https://api.github.com/repos/nshoemaker/nghttp2/milestones{/number}","notifications_url":"https://api.github.com/repos/nshoemaker/nghttp2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nshoemaker/nghttp2/labels{/name}","releases_url":"https://api.github.com/repos/nshoemaker/nghttp2/releases{/id}","created_at":"2015-07-09T22:34:19Z","updated_at":"2015-07-09T22:34:21Z","pushed_at":"2015-08-08T00:41:37Z","git_url":"git://github.com/nshoemaker/nghttp2.git","ssh_url":"git@github.com:nshoemaker/nghttp2.git","clone_url":"https://github.com/nshoemaker/nghttp2.git","svn_url":"https://github.com/nshoemaker/nghttp2","homepage":"https://nghttp2.org","size":21309,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/8"},"html":{"href":"https://github.com/nshoemaker/nghttp2/pull/8"},"issue":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/issues/8"},"comments":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/nshoemaker/nghttp2/statuses/e1115adcbf23d609cfb06a379c7993599922754e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":16,"additions":154,"deletions":4,"changed_files":2}}