Skip to content

Conversation

bowenli86
Copy link
Contributor

@bowenli86 bowenli86 commented Feb 15, 2025

Motivation:

After multiple improvements to other parts of our CI, the coverage job has become the longest-running task, limiting the total CI runtime.

This PR significantly reduces the coverage runtime from 16-18 minutes (already down from 26 minutes thanks to a previous improvement using an x64 16-core runner) to just 2 minutes—an 8-9x speedup.

Modifications:

  • Parallelized coverage report generation.
  • Cached Foundry and Cargo artifacts.
  • Optimized Forge arguments.

Result:

The coverage runtime is reduced from 16-18 minutes (previously 26 minutes) to 2 minutes, achieving an 8-9x improvement.

@bowenli86
Copy link
Contributor Author

image

@bowenli86 bowenli86 marked this pull request as ready for review February 15, 2025 06:23
@bowenli86 bowenli86 changed the title perf: speed up test coverage perf: speed up test coverage job in CI Feb 15, 2025
@0xClandestine
Copy link
Member

Surprised this worked, pre parallelism caching led to longer ci times.

Copy link
Member

@0xClandestine 0xClandestine left a comment

Choose a reason for hiding this comment

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

One suggestion, looks good otherwise.

@bowenli86
Copy link
Contributor Author

the most expensive part now of coverage is now installing loc

@0xClandestine 0xClandestine self-requested a review February 17, 2025 20:07
@ypatil12
Copy link
Collaborator

🔥🔥🔥

@0xClandestine 0xClandestine merged commit 742402b into dev Feb 17, 2025
9 checks passed
@0xClandestine 0xClandestine deleted the feat/coverage branch February 17, 2025 20:15
@0xClandestine 0xClandestine added the ⚡ Optimization Performance or efficiency improvements. label Feb 17, 2025
ypatil12 pushed a commit that referenced this pull request Feb 22, 2025
**Motivation:**  

After multiple improvements to other parts of our CI, the coverage job
has become the longest-running task, limiting the total CI runtime.

This PR significantly reduces the coverage runtime from **16-18
minutes** (already down from **26 minutes** thanks to a previous
improvement using an x64 16-core runner) to just **2 minutes**—an **8-9x
speedup**.

**Modifications:**  

- Parallelized coverage report generation.  
- Cached Foundry and Cargo artifacts.  
- Optimized Forge arguments.

**Result:**  

The coverage runtime is reduced from **16-18 minutes** (previously **26
minutes**) to **2 minutes**, achieving an **8-9x improvement**.

---------

Co-authored-by: clandestine.eth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ Optimization Performance or efficiency improvements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants