[h2load] add support for requests until reconnect via -q #1593
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings!
This PR should not be merged as is (because it has at least one bug), but highlights a feature I'd love to see in h2load.
I would love to tell h2load to force clients to reconnect to the server after a certain number of requests have been issued. I would like to do this so that I can benchmark TLS handshakes after a certain number of requests have been issued.
This PR attempts to do this only for http1.1 and it creates a bug where the last request is never issued to the server and is always marked as a failure.
In order to test this PR, I created a simple python web server:
which I ran with
strace -tf -etrace=accept python test.py
(so that I could more easily track the number of reconnects).and then issued requests against it, like this:
This results in the server showing the following:
(This is off by 1 because the requests are counted in the msg_complete cb, it would probably be better to count them in
submit_request
or similar)and
h2load
reports:As you can see, the 8th request is never issued and is always marked as a failure -- as such, this PR should not be merged.
Is this a feature that h2load would potentially benefit from? If so, perhaps I can get this into a better state fit for merging. Any suggestions on this approach are appreciated 馃槃