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

diff.groovy: add multi thread support #762

Open
rnveach opened this issue Jan 9, 2023 · 2 comments
Open

diff.groovy: add multi thread support #762

rnveach opened this issue Jan 9, 2023 · 2 comments

Comments

@rnveach
Copy link
Member

rnveach commented Jan 9, 2023

We need to add multi-threading support to diff.groovy for regression runs.

Right now, running a big config on 48 projects takes me about 150 minutes total. Regression only runs on a single thread currently, so most CPUs time is spent waiting as most computers have multiple cores these days.

This is blocked by checkstyle/checkstyle#4409 .

@rnveach
Copy link
Member Author

rnveach commented Jan 9, 2023

I have started a test area for my multi-threading implementation and currently 2 additional threads reduces my run times almost in half (80 minutes) with regression showing no differences.

Checkstyle MT Test Branch: checkstyle/checkstyle@master...rnveach:checkstyle:issue_138_rebase_slim
Config's Root Module: MultiThreadedChecker
Config's Thread Property: <property name="numberOfThreads" value="3"/>
Launch Diff Test Branch: https://github.com/rnveach/contribution/commits/rvmaster

Command to run on Linux with custom JAR:
java -classpath multithreading.jar:checkstyle-10.7.0-SNAPSHOT-all.jar com.puppycrawl.tools.checkstyle.Main -c ...
Windows users probably have to swap : with ; in the classpath.

Current Regression Results:
http://rveach.no-ip.org/checkstyle/regression/334/
http://rveach.no-ip.org/checkstyle/regression/333/

@romani
Copy link
Member

romani commented Jan 9, 2023

Let's not go to MT mode of checkstyle itself.

Let's do it easier by execution of checkstyle in single thread and process, but have multiple threads of groovy to run each project in separate thread/process. MT in groovy.

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

No branches or pull requests

2 participants