forked from chainguard-dev/malcontent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use concurrency for path scanning (chainguard-dev#405)
* Use file descriptors Signed-off-by: egibs <[email protected]> * Relocate file descriptor code; implement working concurrency for discovered paths Signed-off-by: egibs <[email protected]> * Move to ordered map; relocate File rendering Signed-off-by: egibs <[email protected]> * Limit concurrency to runtime.NumCPU() Signed-off-by: egibs <[email protected]> * Rename map variables Signed-off-by: egibs <[email protected]> * Directly initialize diff maps Signed-off-by: egibs <[email protected]> * Appease the linter Signed-off-by: egibs <[email protected]> * Configurable concurrency Signed-off-by: egibs <[email protected]> * Update samples_test.go Signed-off-by: egibs <[email protected]> * More consolidation Signed-off-by: egibs <[email protected]> * Add exists check Signed-off-by: egibs <[email protected]> * Use -j instead of -c for concurrency Signed-off-by: egibs <[email protected]> * Use an errgroup instead of a waitgroup + semaphore Signed-off-by: egibs <[email protected]> * Use SetLimit; add concurrency config to all tests; linting fixes Signed-off-by: egibs <[email protected]> * Move sorting code into scan.go; move rendering inside of map construction loop Signed-off-by: egibs <[email protected]> * Use 8-core runner for tests Signed-off-by: egibs <[email protected]> * Go back to ubuntu-latest Signed-off-by: egibs <[email protected]> * Run core tests in parallel Signed-off-by: egibs <[email protected]> * Better alias naming, consolidate structs Signed-off-by: egibs <[email protected]> * Run make fix Signed-off-by: egibs <[email protected]> * Replace mutexes with sync.Map Signed-off-by: egibs <[email protected]> * Remove struct/type Signed-off-by: egibs <[email protected]> * Appease the linter Signed-off-by: egibs <[email protected]> --------- Signed-off-by: egibs <[email protected]> Signed-off-by: Evan Gibler <[email protected]>
- Loading branch information
Showing
14 changed files
with
219 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.