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

feat: instrument source files in parallel #302

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Sep 30, 2024

Instrumentation of source files can be performed in parallel, as the AST transformations do not span across files. Once the files are parsed & type checked, using a distinct decorator per file enables parallel processing & more efficient post-processing (fewer items in the decorator maps, none of which irrelevant to the current AST being post-processed).

This would improve the performance of builds, and a local profile showed a 70% improvement on the specific package I was playing with.


Jira: APPSEC-54998

@RomainMuller RomainMuller requested a review from a team as a code owner September 30, 2024 13:07
@RomainMuller RomainMuller added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 471dc7c Sep 30, 2024
23 checks passed
@RomainMuller RomainMuller deleted the romain.marcadier/parallel-process branch September 30, 2024 14:08
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 70.21277% with 14 lines in your changes missing coverage. Please review.

Project coverage is 73.83%. Comparing base (6f519f1) to head (383872e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/injector/injector.go 66.66% 10 Missing and 2 partials ⚠️
internal/injector/aspect/context/node.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #302      +/-   ##
==========================================
+ Coverage   73.77%   73.83%   +0.05%     
==========================================
  Files         145      145              
  Lines        7958     7972      +14     
==========================================
+ Hits         5871     5886      +15     
+ Misses       1658     1657       -1     
  Partials      429      429              
Components Coverage Δ
Generators 76.69% <ø> (ø)
Instruments 88.05% <ø> (ø)
Go Driver 72.81% <ø> (ø)
Toolexec Driver 70.88% <ø> (ø)
Aspects 71.95% <0.00%> (ø)
Injector 73.42% <65.85%> (+<0.01%) ⬆️
Job Server 63.72% <100.00%> (+0.52%) ⬆️
Integration Test Suite 87.80% <ø> (ø)
Other 73.83% <70.21%> (+0.05%) ⬆️
Files with missing lines Coverage Δ
internal/injector/restorer.go 75.00% <100.00%> (+0.71%) ⬆️
internal/jobserver/pkgs/resolve.go 89.38% <100.00%> (+4.95%) ⬆️
internal/injector/aspect/context/node.go 72.00% <0.00%> (ø)
internal/injector/injector.go 72.30% <66.66%> (+0.08%) ⬆️

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