Skip to content

Conversation

@paulhauner
Copy link
Member

@paulhauner paulhauner commented Oct 1, 2021

Issue Addressed

NA

Proposed Changes

Following @michaelsproul's example in #2404, this disables autotests for the beacon_chain crate. This means the tests in the tests directory all compile as a single binary, rather than individual binaries. This reduces total compilation time.

Benchmarks

With autotests (i.e., unstable):

   Compiling lighthouse_version v0.1.0 (/home/paul/development/lighthouse/common/lighthouse_version)
   Compiling eth2_libp2p v0.2.0 (/home/paul/development/lighthouse/beacon_node/eth2_libp2p)
   Compiling eth2 v0.1.0 (/home/paul/development/lighthouse/common/eth2)
   Compiling eth1 v0.2.0 (/home/paul/development/lighthouse/beacon_node/eth1)
   Compiling genesis v0.2.0 (/home/paul/development/lighthouse/beacon_node/genesis)
   Compiling beacon_chain v0.2.0 (/home/paul/development/lighthouse/beacon_node/beacon_chain)
    Finished release [optimized] target(s) in 1m 19s

Without autotests (this PR):

   Compiling lighthouse_version v0.1.0 (/home/paul/development/lighthouse/common/lighthouse_version)
   Compiling eth2_libp2p v0.2.0 (/home/paul/development/lighthouse/beacon_node/eth2_libp2p)
   Compiling eth2 v0.1.0 (/home/paul/development/lighthouse/common/eth2)
   Compiling eth1 v0.2.0 (/home/paul/development/lighthouse/beacon_node/eth1)
   Compiling genesis v0.2.0 (/home/paul/development/lighthouse/beacon_node/genesis)
   Compiling beacon_chain v0.2.0 (/home/paul/development/lighthouse/beacon_node/beacon_chain)
    Finished release [optimized] target(s) in 43.48s

This is running on my hex-core machine. I suspect the improvement will be much greater on lower-core-count hardware since they can't compile multiple crates in parallel.

Additional Info

@michaelsproul I'm not very well informed on autotests, I could use your eyes to make sure I'm not missing anything 🙏

@paulhauner paulhauner added the work-in-progress PR is a work-in-progress label Oct 1, 2021
@paulhauner paulhauner changed the base branch from stable to unstable October 1, 2021 00:22
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this looks good!

I can't remember why I didn't blitz more of the crates when I did this originally... 🤔

@paulhauner paulhauner added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Oct 1, 2021
@paulhauner paulhauner changed the base branch from unstable to merge-f2f October 1, 2021 06:48
@paulhauner paulhauner added the merge-f2f Relates to the Oct 2021 Merge F2F label Oct 1, 2021
@paulhauner paulhauner marked this pull request as ready for review October 1, 2021 06:48
@paulhauner paulhauner force-pushed the beacon-chain-autotests branch from 746cd04 to 9e249e4 Compare October 1, 2021 07:02
@paulhauner paulhauner mentioned this pull request Oct 1, 2021
7 tasks
@paulhauner paulhauner force-pushed the beacon-chain-autotests branch from 9e249e4 to 251df70 Compare October 1, 2021 08:45
@paulhauner paulhauner merged commit 61ab320 into sigp:merge-f2f Oct 1, 2021
paulhauner added a commit that referenced this pull request Oct 12, 2021
paulhauner added a commit that referenced this pull request Oct 27, 2021
paulhauner added a commit to paulhauner/lighthouse that referenced this pull request Nov 3, 2021
paulhauner added a commit that referenced this pull request Nov 11, 2021
paulhauner added a commit that referenced this pull request Nov 28, 2021
paulhauner added a commit that referenced this pull request Nov 28, 2021
paulhauner added a commit that referenced this pull request Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-f2f Relates to the Oct 2021 Merge F2F ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants