Hello adg@golang.org, bradfitz@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.benchmarks
10 years, 2 months ago
(2014-02-10 16:24:30 UTC)
#1
LGTM but see comments. feel free to ignore if you disagree. https://codereview.appspot.com/61040044/diff/80001/http/http.go File http/http.go (right): ...
10 years, 2 months ago
(2014-02-11 21:54:28 UTC)
#7
10 years, 2 months ago
(2014-02-12 14:18:06 UTC)
#8
https://codereview.appspot.com/61040044/diff/80001/http/http.go
File http/http.go (right):
https://codereview.appspot.com/61040044/diff/80001/http/http.go#newcode29
http/http.go:29: func benchmarkHttpImpl(N uint64) {
On 2014/02/11 21:54:29, bradfitz wrote:
> HTTPImpl capital
Done.
https://codereview.appspot.com/61040044/diff/80001/http/http.go#newcode68
http/http.go:68: l, err := net.Listen("tcp", "127.0.0.1:0")
On 2014/02/11 21:54:29, bradfitz wrote:
> I would just use httptest.NewUnstartedServer, tweak its params, then run
> httptest.Server.Start.
>
> It will do this IPv4 vs IPv6 stuff.
I don't trust it.
It must work reliably back to Go1.
There is some historyListener and waitGroupHandler, I don't want them to affect
the results.
What if we decide to add anotherFancyHandlerWrapper that is really useful for
testing...
https://codereview.appspot.com/61040044/diff/80001/http/http.go#newcode88
http/http.go:88: Proxy: http.ProxyFromEnvironment,
On 2014/02/11 21:54:29, bradfitz wrote:
> I see why you'd want to use the same as the default, but I think you also want
> to eliminate the use of a proxy which could interfere with benchmarks. I
would
> just set this to nil.
ProxyFromEnvironment is part of default setup which everybody uses, I would
prefer to test it as well.
But it's a good point about interference. I've added the following in the
beginning of init:
// These environment variables affect net/http behavior,
// ensure that we get predictable results regardless of environment on the
machine.
os.Setenv("HTTP_PROXY", "")
os.Setenv("http_proxy", "")
os.Setenv("NO_PROXY", "")
os.Setenv("no_proxy", "")
Issue 61040044: code review 61040044: bench: add http benchmark
(Closed)
Created 10 years, 2 months ago by dvyukov
Modified 10 years, 2 months ago
Reviewers:
Base URL:
Comments: 18