Skip to content

Commit

Permalink
Merge branch 'main' into dsl-update
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCockx authored Sep 17, 2024
2 parents f6eeb29 + ed9379f commit ac9e7ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ public <T extends RosettaModelObject> PostProcessorReport runProcessStep(Class<?
RosettaPath path = RosettaPath.valueOf(topClass.getSimpleName());
for (MappingDelegate mapper : mappingDelegates) {
LOGGER.debug("Running mapper {} for model path {}", mapper.getClass().getSimpleName(), mapper.getModelPath());
long t0 = System.currentTimeMillis();
MappingBuilderProcessor processor = new MappingBuilderProcessor(mapper);
processor.processRosetta(path, topClass, builder, null);
long t = System.currentTimeMillis() - t0;
if (t > 200) {
LOGGER.debug("Took {} ms to run mapper {} for model path {}", t, mapper.getClass().getSimpleName(), mapper.getModelPath());
}
builder.process(path, processor);
}
// Mapper thread waits for invoked tasks to complete before continuing (subject to timeout before)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ public class ClassPathUtils {
* @param classLoader Classloader to search in.
* @return
*/

public static List<Path> findPathsFromClassPath(Collection<String> classPathDirectories, String includeRegex, Optional<String> excludeRegex, ClassLoader classLoader) {
List<Path> modelPaths = classPathDirectories.stream().flatMap(path -> loadFromClasspath(path, classLoader))
.collect(Collectors.toList());
List<Path> expandedModelPaths = expandPaths(modelPaths, includeRegex, excludeRegex);
LOGGER.debug("Using paths:" + expandedModelPaths);
expandedModelPaths.forEach(x -> LOGGER.debug(" " + x));
LOGGER.trace("Using paths: {}", expandedModelPaths);
expandedModelPaths.forEach(x -> LOGGER.trace(" {}", x));
return expandedModelPaths;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public List<ValidationResult<?>> results() {
public void logReport() {
for (ValidationResult<?> validationResult : validationResults) {
if (!validationResult.isSuccess()) {
LOGGER.error(validationResult.toString());
} else {
LOGGER.debug(validationResult.toString());
} else {
LOGGER.trace(validationResult.toString());
}
}
}
Expand Down

0 comments on commit ac9e7ef

Please sign in to comment.