feat(scan): add -concurrency flag to scan targets in parallel#367
Open
TBX3D wants to merge 2 commits into
Open
feat(scan): add -concurrency flag to scan targets in parallel#367TBX3D wants to merge 2 commits into
TBX3D wants to merge 2 commits into
Conversation
pull the target loop body into scanTarget, which returns a targetScan holding that target's findings, report rows, scan labels and log files instead of appending onto run-wide slices. the run loop merges those in target order and finishRun handles the post-loop notify/silent/report/ summary steps. behavior is identical for the sequential run today; the isolation is the seam a bounded worker pool needs next.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #367 +/- ##
=======================================
Coverage ? 54.89%
=======================================
Files ? 81
Lines ? 6939
Branches ? 0
=======================================
Hits ? 3809
Misses ? 2823
Partials ? 307 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pr summary7 files changed (+638 -325)
|
add -concurrency N (default 1) to run the per-target scan pool over several targets at once. scanTarget already returns isolated accumulators, so workers share only the console: output.SetConcurrent serializes sink writes and de-animates spinners/progress so parallel lines stay whole. results merge in input order, and concurrency 1 keeps the sequential path unchanged.
d62d79a to
634e6b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scanning targets one at a time serializes wall-clock time with target count. add a -concurrency flag that runs a worker pool over targets, defaulting to the current sequential behavior when unset.
stacked on #330 (per-target scan extraction) - this only makes sense once scanTarget exists as its own function.