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

rpc, internal/guide: speed up tests a bit #26193

Merged
merged 3 commits into from
Nov 17, 2022
Merged

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Nov 16, 2022

This should remove about two minutes 75s on CI.

The internal/guide test was news to me, but apparently it executes the commands on the page here: https://geth.ethereum.org/docs/dapp/native-accounts . Well, doing full scrypt on CI is very slow, so maybe we don't have to do it all the time.

On Image: Visual Studio 2019; Environment: GETH_ARCH=386, GETH_MINGW=C:\msys64\mingw32, without this PR

ok  	github.com/ethereum/go-ethereum/internal/guide	18.755s	coverage: [no statements]
...
ok  	github.com/ethereum/go-ethereum/rpc	107.314s	coverage: 84.1% of statements

With this PR

ok  	github.com/ethereum/go-ethereum/internal/guide	1.751s	coverage: [no statements]
...
ok  	github.com/ethereum/go-ethereum/rpc	49.667s	coverage: 83.7% of statements

This test takes > 90s to execute, and does not need to be executed normally.
@holiman holiman requested a review from fjl as a code owner November 16, 2022 09:54
@holiman holiman changed the title Faster test rpc, internal/guide: speed up tests a bit Nov 16, 2022
@holiman
Copy link
Contributor Author

holiman commented Nov 16, 2022

These are the biggest timesinks on the windows CI

package time
github.com/ethereum/go-ethereum/tests 320.869
github.com/ethereum/go-ethereum/eth/downloader 150.764
github.com/ethereum/go-ethereum/p2p/discover 99.935
github.com/ethereum/go-ethereum/trie 82.508
github.com/ethereum/go-ethereum/consensus/ethash 77.82
github.com/ethereum/go-ethereum/les 69.552
github.com/ethereum/go-ethereum/eth/protocols/snap 62.451
github.com/ethereum/go-ethereum/les/downloader 58.636
github.com/ethereum/go-ethereum/core 58.187
github.com/ethereum/go-ethereum/rpc 49.667
github.com/ethereum/go-ethereum/eth/fetcher 44.512
github.com/ethereum/go-ethereum/les/fetcher 40.346
github.com/ethereum/go-ethereum/core/vm 36.163
github.com/ethereum/go-ethereum/cmd/devp2p/internal/ethtest 34.392
github.com/ethereum/go-ethereum/les/vflux/server 34.363
github.com/ethereum/go-ethereum/cmd/geth 23.341
github.com/ethereum/go-ethereum/core/state 19.69
github.com/ethereum/go-ethereum/core/txpool 17.696
github.com/ethereum/go-ethereum/les/flowcontrol 17.407
github.com/ethereum/go-ethereum/metrics 16.932
github.com/ethereum/go-ethereum/core/rawdb 16.279
github.com/ethereum/go-ethereum/miner 15.707
github.com/ethereum/go-ethereum/eth 14.822
github.com/ethereum/go-ethereum/crypto/bls12381 13.906
github.com/ethereum/go-ethereum/accounts/keystore 13.885

@fjl fjl merged commit 97c563e into ethereum:master Nov 17, 2022
@fjl fjl added this to the 1.11.0 milestone Nov 17, 2022
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
This removes an RPC test which takes > 90s to execute, and updates the
internal/guide tests to use lighter scrypt parameters.

Co-authored-by: Felix Lange <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants