-
Notifications
You must be signed in to change notification settings - Fork 79
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
Profiling/improving our tests #2379
Comments
Packages where tests take more than 5 seconds (on my machine):
|
It can be split into subpackages which can then be run in parallel (the effect was seen in #1472 already). My current list is:
|
Argh.
|
Refs. #2379, but not completely solves it, one package seriously outweights others: ? github.com/nspcc-dev/neo-go/cli [no test files] ok github.com/nspcc-dev/neo-go/cli/app 0.036s coverage: 100.0% of statements ok github.com/nspcc-dev/neo-go/cli/cmdargs 0.011s coverage: 60.8% of statements ok github.com/nspcc-dev/neo-go/cli/flags 0.009s coverage: 97.7% of statements ? github.com/nspcc-dev/neo-go/cli/input [no test files] ok github.com/nspcc-dev/neo-go/cli/options 0.033s coverage: 50.0% of statements ? github.com/nspcc-dev/neo-go/cli/paramcontext [no test files] ok github.com/nspcc-dev/neo-go/cli/query 2.155s coverage: 45.3% of statements ok github.com/nspcc-dev/neo-go/cli/server 1.373s coverage: 67.8% of statements ok github.com/nspcc-dev/neo-go/cli/smartcontract 8.819s coverage: 94.3% of statements ok github.com/nspcc-dev/neo-go/cli/util 0.006s coverage: 10.9% of statements ? github.com/nspcc-dev/neo-go/cli/vm [no test files] ok github.com/nspcc-dev/neo-go/cli/wallet 72.103s coverage: 88.2% of statements Still a nice thing to have.
Refs. #2379, but not completely solves it, one package seriously outweights others: ? github.com/nspcc-dev/neo-go/cli [no test files] ok github.com/nspcc-dev/neo-go/cli/app 0.036s coverage: 100.0% of statements ok github.com/nspcc-dev/neo-go/cli/cmdargs 0.011s coverage: 60.8% of statements ok github.com/nspcc-dev/neo-go/cli/flags 0.009s coverage: 97.7% of statements ? github.com/nspcc-dev/neo-go/cli/input [no test files] ok github.com/nspcc-dev/neo-go/cli/options 0.033s coverage: 50.0% of statements ? github.com/nspcc-dev/neo-go/cli/paramcontext [no test files] ok github.com/nspcc-dev/neo-go/cli/query 2.155s coverage: 45.3% of statements ok github.com/nspcc-dev/neo-go/cli/server 1.373s coverage: 67.8% of statements ok github.com/nspcc-dev/neo-go/cli/smartcontract 8.819s coverage: 94.3% of statements ok github.com/nspcc-dev/neo-go/cli/util 0.006s coverage: 10.9% of statements ? github.com/nspcc-dev/neo-go/cli/vm [no test files] ok github.com/nspcc-dev/neo-go/cli/wallet 72.103s coverage: 88.2% of statements Still a nice thing to have.
Refs. #2379, but not completely solves it, one package seriously outweights others: ? github.com/nspcc-dev/neo-go/cli [no test files] ok github.com/nspcc-dev/neo-go/cli/app 0.036s coverage: 100.0% of statements ok github.com/nspcc-dev/neo-go/cli/cmdargs 0.011s coverage: 60.8% of statements ok github.com/nspcc-dev/neo-go/cli/flags 0.009s coverage: 97.7% of statements ? github.com/nspcc-dev/neo-go/cli/input [no test files] ok github.com/nspcc-dev/neo-go/cli/options 0.033s coverage: 50.0% of statements ? github.com/nspcc-dev/neo-go/cli/paramcontext [no test files] ok github.com/nspcc-dev/neo-go/cli/query 2.155s coverage: 45.3% of statements ok github.com/nspcc-dev/neo-go/cli/server 1.373s coverage: 67.8% of statements ok github.com/nspcc-dev/neo-go/cli/smartcontract 8.819s coverage: 94.3% of statements ok github.com/nspcc-dev/neo-go/cli/util 0.006s coverage: 10.9% of statements ? github.com/nspcc-dev/neo-go/cli/vm [no test files] ok github.com/nspcc-dev/neo-go/cli/wallet 72.103s coverage: 88.2% of statements Still a nice thing to have.
Refs. #2379, but not completely solves it, one package seriously outweights others: ? github.com/nspcc-dev/neo-go/cli [no test files] ok github.com/nspcc-dev/neo-go/cli/app 0.036s coverage: 100.0% of statements ok github.com/nspcc-dev/neo-go/cli/cmdargs 0.011s coverage: 60.8% of statements ok github.com/nspcc-dev/neo-go/cli/flags 0.009s coverage: 97.7% of statements ? github.com/nspcc-dev/neo-go/cli/input [no test files] ok github.com/nspcc-dev/neo-go/cli/options 0.033s coverage: 50.0% of statements ? github.com/nspcc-dev/neo-go/cli/paramcontext [no test files] ok github.com/nspcc-dev/neo-go/cli/query 2.155s coverage: 45.3% of statements ok github.com/nspcc-dev/neo-go/cli/server 1.373s coverage: 67.8% of statements ok github.com/nspcc-dev/neo-go/cli/smartcontract 8.819s coverage: 94.3% of statements ok github.com/nspcc-dev/neo-go/cli/util 0.006s coverage: 10.9% of statements ? github.com/nspcc-dev/neo-go/cli/vm [no test files] ok github.com/nspcc-dev/neo-go/cli/wallet 72.103s coverage: 88.2% of statements Still a nice thing to have.
I do see some reduced testing time for cli components with this setting even though it doesn't affect the overall time for me. Maybe it'll be beneficial in some cases. Refs. #2379.
I do see some reduced testing time for cli components with this setting even though it doesn't affect the overall time for me. Maybe it'll be beneficial in some cases. Refs. #2379.
Block verification can be disabled in most of tests to remove some crypto overhead. |
Btw, I have recently stumbled upon https://github.com/gotestyourself/gotestsum which is quite useful
|
We have more and more timeouts happening for test runs, so 10m is not enough for busy GH machines sometime. I think we can just give them a bit more time. Refs. #2379 though. Signed-off-by: Roman Khimov <roman@nspcc.ru>
We've got a lot of tests which is very good except they take a heck lot of time to run. There were some optimizations already done previously (most notably in #2001), but it's time to make another round. First of all, the most resource-demanding tests need to be identified and then we'll think on whether and how they can be improved.
The text was updated successfully, but these errors were encountered: