-
-
Notifications
You must be signed in to change notification settings - Fork 671
Running tests with ginkgo
significantly slower than go test
#644
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
Comments
ginkgo
twice as slow as go test
ginkgo
significantly slower than go test
At Tidepool we're also seeing roughly 2 times slower test execution times. We have a very large test suite, which takes more than 8 minutes to complete with |
Also I notice a very slow performance of running ginkgo. Has any of you found a workaround? |
sorry for the radio silence, y'all. i'd like to get too the bottom of this. specifically
we'll get to the bottom of this. |
actually i see that @charleskorn is pointing to a repo that reproduces the issue. i'll dig in and report back |
I've made some progress outlined here: tl;dr: Ginkgo compiles test suites into a temp directory and then runs them. I'm observing a latency of O(500ms) when launching compiled test suites stored in temp directories. Changing Ginkgo's behavior to store compiled assets (temporarily) in the package path itself reduces this latency substantially. Without this change, Ginkgo is O(500ms) slower than Note that Ginkgo is still O(100ms) slower than With the new behavior I see the ginkgo unit tests go from O(16.2s) down to O(12.7s). I'm pushing a commit with the new behavior. I don't expect it to address all the issues folks are experiencing, but it's a start. Please give it a whirl. @toddkazakov I'd love more detail on your usecase. Any chance there's a repo I can clone that reproduces the issue? |
I'll note that I don't understand why this change makes such a significant difference. And it may well be OS/hardware dependent (I'm running MacOS on a macbook pro with an SSD drive). |
Thanks for your help @onsi. The issue can be reproduced in https://github.com/tidepool-org/platform. The tests can be executed with The issue is more apparent in Travis due to the resource constraints. I tried removing all extra options (coverage, race condition detection, randomization, etc) and set the compilers to 1. There was no significant speed up. However, this still doesn't explain why plain Locally, the test compilation is parallelized and they run ok on a 6-core MBP with SSD. |
thanks @toddkazakov i’ll take a look. I assume you see the same discrepancy on your MPB between ginkgo and go test? And I see that you don’t have |
hey @toddkazakov quick update:
a difference of almost 30s! Can you give the latest commit a try and see if you're also seeing improvements? |
The mongo error you're seeing is most likely caused by running a too recent version - we're using 3.6. I ran a series of test today. Using the latest commit does provide a speed up locally, albeit small. I believe this will have a much bigger effect in Travis.
vs the version we were using previously:
I was able to make In my case I was comparing apples to oranges, but it was not obvious. Thank you for looking into this - I still think the result is very valuable. |
ah ok makes sense. yes the race detector will slow things down substantially. |
@elamre can you point me at a repo or give me a bit more detail so i can understand what sort of performance issues you are seeing? |
Closing due to inactivity |
Would it be an idea to limit this somehow? I'm also wondering if it's able to utilize caching efficiently like this if it start a lot of build processes at the same time of tests that share a lot of packages. |
Thanks for the awesome project!
I'm seeing an odd issue: running my test suites with
ginkgo
takes significantly longer than running them withgo test
:I've tried setting
-compilers
to a low number as suggested in #258, but this doesn't have a significant impact.batect/abacus@f8d4c57 is the commit I'm testing this on.
The text was updated successfully, but these errors were encountered: