Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: 3x performance regression in go test relative to Go 1.11 #28525

Closed
davecheney opened this issue Nov 1, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@davecheney
Copy link
Contributor

commented Nov 1, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

% go version
go version devel +01f0dbbafc Thu Nov 1 00:54:46 2018 +0000 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

darwin/amd64

What did you do?

(~/src/github.com/heptio/contour) % time go1.11 test ./...
?       github.com/heptio/contour/apis/contour/v1beta1  [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned    [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/fake       [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/scheme     [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/typed/contour/v1beta1      [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/typed/contour/v1beta1/fake [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions     [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions/contour     [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions/contour/v1beta1     [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions/internalinterfaces  [no test files]
?       github.com/heptio/contour/apis/generated/listers/contour/v1beta1        [no test files]
ok      github.com/heptio/contour/cmd/contour   (cached)
ok      github.com/heptio/contour/internal/contour      (cached)
ok      github.com/heptio/contour/internal/dag  (cached)
?       github.com/heptio/contour/internal/debug        [no test files]
ok      github.com/heptio/contour/internal/e2e  (cached)
ok      github.com/heptio/contour/internal/envoy        (cached)
ok      github.com/heptio/contour/internal/grpc (cached)
?       github.com/heptio/contour/internal/httpsvc      [no test files]
ok      github.com/heptio/contour/internal/k8s  (cached)
ok      github.com/heptio/contour/internal/metrics      (cached)

real    0m1.148s
user    0m2.947s
sys     0m1.139s

What did you expect to see?

wall time for go test should be the same or better than Go 1.11.

What did you see instead?

(~/src/github.com/heptio/contour) % time go test ./...
?       github.com/heptio/contour/apis/contour/v1beta1  [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned    [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/fake       [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/scheme     [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/typed/contour/v1beta1      [no test files]
?       github.com/heptio/contour/apis/generated/clientset/versioned/typed/contour/v1beta1/fake [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions     [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions/contour     [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions/contour/v1beta1     [no test files]
?       github.com/heptio/contour/apis/generated/informers/externalversions/internalinterfaces  [no test files]
?       github.com/heptio/contour/apis/generated/listers/contour/v1beta1        [no test files]
ok      github.com/heptio/contour/cmd/contour   (cached)
ok      github.com/heptio/contour/internal/contour      (cached)
ok      github.com/heptio/contour/internal/dag  (cached)
?       github.com/heptio/contour/internal/debug        [no test files]
ok      github.com/heptio/contour/internal/e2e  (cached)
ok      github.com/heptio/contour/internal/envoy        (cached)
ok      github.com/heptio/contour/internal/grpc (cached)
?       github.com/heptio/contour/internal/httpsvc      [no test files]
ok      github.com/heptio/contour/internal/k8s  (cached)
ok      github.com/heptio/contour/internal/metrics      (cached)

real    0m5.247s
user    0m5.312s
sys     0m3.849s

Go test time has regressed by 3x

/cc @andybons

@agnivade

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

It seems either the test is cached or there are no test files. I wonder where so much time is being spent on.

@davecheney

This comment has been minimized.

Copy link
Contributor Author

commented Nov 1, 2018

I've removed ~/Library/Caches/go-build and this resolved the problem.

@davecheney davecheney closed this Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.