-
Notifications
You must be signed in to change notification settings - Fork 607
Improve performance of mock generation (#396) #397
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the idea overall, lets just work through a couple of my nitpicks. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the updates. Just a couple more things and then we can get this merged!
Thanks for working through this with me @plakhotnii and thank you for your contribution! 🎆 |
@codyoss Could you please release the v1.5.0? This fix here will help me a lot. 🙂 |
@rafaeljusto I can cut a version later today or tomorrow. Will just be a path: v1.4.1. |
Perfect, thanks! |
@rafaeljusto I did a release last night 😺 |
Thank you! 😄 |
This release of mockgen has an important speed improvement: golang/mock#397 Signed-off-by: Steven Danna <steve@chef.io>
This release of mockgen has an important speed improvement: golang/mock#397 On linux, with tools already installed and a primed cache, we go from: > time compile_client_mocks ... real 0m55.859s user 1m39.088s sys 1m40.395s to > time compile_client_mocks ... real 0m9.133s user 0m12.420s sys 0m7.568s Unfortunately, on macOS+Docker, the impact isn't as dramatic: > time compile_client_mocks ... real 1m32.170s user 1m46.861s sys 2m31.633s to > time compile_client_mocks ... real 1m8.510s user 0m21.225s sys 0m24.807s Signed-off-by: Steven Danna <steve@chef.io>
This release of mockgen has an important speed improvement: golang/mock#397 On linux, with tools already installed and a primed cache, we go from: > time compile_client_mocks ... real 0m55.859s user 1m39.088s sys 1m40.395s to > time compile_client_mocks ... real 0m9.133s user 0m12.420s sys 0m7.568s Unfortunately, on macOS+Docker, the impact isn't as dramatic: > time compile_client_mocks ... real 1m32.170s user 1m46.861s sys 2m31.633s to > time compile_client_mocks ... real 1m8.510s user 0m21.225s sys 0m24.807s Signed-off-by: Steven Danna <steve@chef.io>
Fixes #396. This PR optimise resolving correct package name with
go list
command. Instead of callinggo list
for each import in file, now we do it for all imports in one call.Time consuming by mockgen:
Source mode
Reflection mode