tests: refactor benchmarks to remove test server overhead#20
Merged
felixge merged 1 commit intofelixge:masterfrom Jul 24, 2022
Merged
Conversation
The httptest Server introduces unrelated overhead to the benchmarks. Ideally we'd only measure the impact on the wrapped handler.
cbf8594 to
0db2505
Compare
Owner
|
🙏 Thanks. I think I originally put the test server into the benchmark so that the overhead created by httpsnoop is "put into perspective". After applying your patch people might think that httpsnoop is causing 240x overhead 🙈. Anyway, I agree that it's more useful to exclude the test server overhead while trying to optimize things. So I'm okay with this change. |
Contributor
Author
|
Yes, that's a very good point. But I'd argue that this perspective is best given in a README, if these results are mentioned somewhere. If we're running the benchmarks while working on the code, this added "context" is mostly implicit? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The httptest Server introduces unrelated overhead to the benchmarks.
Ideally we'd only measure the impact on the wrapped handler.
Related to #19