Loading de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/T3Q.java +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public class T3Q { private boolean generateNewConfiguration = false; private boolean generateLocalDependencies = false; private final Stopwatch stopwatch = Stopwatch.createUnstarted(); private boolean singleCore = false; // private boolean formattingEnabled = false; Loading Loading @@ -108,6 +109,9 @@ public class T3Q { logger.setMaximumLogLevel(logLevel); TTCN3ResourceProvider resourceProvider = new TTCN3ResourceProvider(inputPaths, logger, activeProfile); TTCN3GlobalScopeProvider.LIVE = false; if (isSingleCore()) { resourceProvider.setCores(1); } resourceProvider.loadResources(); //TODO: check if it has to be exclusive if (!this.isGenerateLocalDependencies()) { Loading Loading @@ -198,6 +202,9 @@ public class T3Q { if (commandLine.hasOption("profile")) { this.setSelectedProfileName(commandLine.getOptionValue("profile")); } if (commandLine.hasOption("single-core")) { this.setSingleCore(true); } if (commandLine.hasOption("verbosity")) { this.selectLogLevel(commandLine.getOptionValue("verbosity")); } Loading Loading @@ -424,4 +431,12 @@ public class T3Q { public void setGenerateLocalDependencies(boolean generateLocalDependencies) { this.generateLocalDependencies = generateLocalDependencies; } public boolean isSingleCore() { return singleCore; } public void setSingleCore(boolean singleCore) { this.singleCore = singleCore; } } de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/TTCN3ResourceProvider.java +12 −4 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class TTCN3ResourceProvider { private ArrayList<String> paths; private LoggingInterface logger; private QualityCheckProfile activeProfile; private final int cores = Runtime.getRuntime().availableProcessors(); private int cores = Runtime.getRuntime().availableProcessors(); @Inject private IQualifiedNameProvider qualifiedNameProvider; Loading @@ -75,7 +75,7 @@ public class TTCN3ResourceProvider { stopwatch.start(); ExecutorService pool = Executors.newFixedThreadPool(cores); ExecutorService pool = Executors.newFixedThreadPool(getCores()); ArrayList<FileParser> parser = new ArrayList<FileParser>(); for (String path : paths) { Loading Loading @@ -130,7 +130,7 @@ public class TTCN3ResourceProvider { public void analyzeResources() { Stopwatch watchAnalyzing = Stopwatch.createStarted(); ExecutorService pool = Executors.newFixedThreadPool(cores); ExecutorService pool = Executors.newFixedThreadPool(getCores()); // Check if resource is a ignored one and if so, do not analyze it. Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Loading Loading @@ -183,7 +183,7 @@ public class TTCN3ResourceProvider { public void analyzeDependencies() { Stopwatch watchAnalyzing = Stopwatch.createStarted(); ExecutorService pool = Executors.newFixedThreadPool(cores); ExecutorService pool = Executors.newFixedThreadPool(getCores()); // Check if resource is a ignored one and if so, do not analyze it. Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Loading Loading @@ -386,4 +386,12 @@ public class TTCN3ResourceProvider { return res[0]; } } public int getCores() { return cores; } public void setCores(int cores) { this.cores = cores; } } de.ugoe.cs.swe.TTCN3Configuration/src/de/ugoe/cs/swe/common/OptionsHandler.java +4 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public class OptionsHandler { getOptions().addOption(optionWithID); optionWithID = new OptionWithID(40, "output-path", "Destination path for the output (if applicable, otherwise ignored). Overrides the profile setting.\n"); "Destination path for the output (if applicable, otherwise ignored), overrides the profile setting\n"); optionWithID.setArgs(1); optionWithID.setArgName("PATH"); getOptions().addOption(optionWithID); Loading @@ -44,6 +44,9 @@ public class OptionsHandler { optionWithID = new OptionWithID(100, "help", "Show this usage information screen\n"); getOptions().addOption(optionWithID); optionWithID = new OptionWithID(100, "single-core", "Use single core only (no parallel processing)\n"); getOptions().addOption(optionWithID); optionWithID = new OptionWithID(200, "local-dependencies", "Generate local dependencies\n"); getOptions().addOption(optionWithID); } Loading Loading
de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/T3Q.java +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public class T3Q { private boolean generateNewConfiguration = false; private boolean generateLocalDependencies = false; private final Stopwatch stopwatch = Stopwatch.createUnstarted(); private boolean singleCore = false; // private boolean formattingEnabled = false; Loading Loading @@ -108,6 +109,9 @@ public class T3Q { logger.setMaximumLogLevel(logLevel); TTCN3ResourceProvider resourceProvider = new TTCN3ResourceProvider(inputPaths, logger, activeProfile); TTCN3GlobalScopeProvider.LIVE = false; if (isSingleCore()) { resourceProvider.setCores(1); } resourceProvider.loadResources(); //TODO: check if it has to be exclusive if (!this.isGenerateLocalDependencies()) { Loading Loading @@ -198,6 +202,9 @@ public class T3Q { if (commandLine.hasOption("profile")) { this.setSelectedProfileName(commandLine.getOptionValue("profile")); } if (commandLine.hasOption("single-core")) { this.setSingleCore(true); } if (commandLine.hasOption("verbosity")) { this.selectLogLevel(commandLine.getOptionValue("verbosity")); } Loading Loading @@ -424,4 +431,12 @@ public class T3Q { public void setGenerateLocalDependencies(boolean generateLocalDependencies) { this.generateLocalDependencies = generateLocalDependencies; } public boolean isSingleCore() { return singleCore; } public void setSingleCore(boolean singleCore) { this.singleCore = singleCore; } }
de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/TTCN3ResourceProvider.java +12 −4 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class TTCN3ResourceProvider { private ArrayList<String> paths; private LoggingInterface logger; private QualityCheckProfile activeProfile; private final int cores = Runtime.getRuntime().availableProcessors(); private int cores = Runtime.getRuntime().availableProcessors(); @Inject private IQualifiedNameProvider qualifiedNameProvider; Loading @@ -75,7 +75,7 @@ public class TTCN3ResourceProvider { stopwatch.start(); ExecutorService pool = Executors.newFixedThreadPool(cores); ExecutorService pool = Executors.newFixedThreadPool(getCores()); ArrayList<FileParser> parser = new ArrayList<FileParser>(); for (String path : paths) { Loading Loading @@ -130,7 +130,7 @@ public class TTCN3ResourceProvider { public void analyzeResources() { Stopwatch watchAnalyzing = Stopwatch.createStarted(); ExecutorService pool = Executors.newFixedThreadPool(cores); ExecutorService pool = Executors.newFixedThreadPool(getCores()); // Check if resource is a ignored one and if so, do not analyze it. Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Loading Loading @@ -183,7 +183,7 @@ public class TTCN3ResourceProvider { public void analyzeDependencies() { Stopwatch watchAnalyzing = Stopwatch.createStarted(); ExecutorService pool = Executors.newFixedThreadPool(cores); ExecutorService pool = Executors.newFixedThreadPool(getCores()); // Check if resource is a ignored one and if so, do not analyze it. Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Loading Loading @@ -386,4 +386,12 @@ public class TTCN3ResourceProvider { return res[0]; } } public int getCores() { return cores; } public void setCores(int cores) { this.cores = cores; } }
de.ugoe.cs.swe.TTCN3Configuration/src/de/ugoe/cs/swe/common/OptionsHandler.java +4 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public class OptionsHandler { getOptions().addOption(optionWithID); optionWithID = new OptionWithID(40, "output-path", "Destination path for the output (if applicable, otherwise ignored). Overrides the profile setting.\n"); "Destination path for the output (if applicable, otherwise ignored), overrides the profile setting\n"); optionWithID.setArgs(1); optionWithID.setArgName("PATH"); getOptions().addOption(optionWithID); Loading @@ -44,6 +44,9 @@ public class OptionsHandler { optionWithID = new OptionWithID(100, "help", "Show this usage information screen\n"); getOptions().addOption(optionWithID); optionWithID = new OptionWithID(100, "single-core", "Use single core only (no parallel processing)\n"); getOptions().addOption(optionWithID); optionWithID = new OptionWithID(200, "local-dependencies", "Generate local dependencies\n"); getOptions().addOption(optionWithID); } Loading