Skip to content

Commit

Permalink
Merge pull request #3003 from HASMAC-AS/GH-3002-shacl-performance-log…
Browse files Browse the repository at this point in the history
…ging
  • Loading branch information
hmottestad authored Apr 17, 2021
2 parents 3395bbf + 7ef1f62 commit 77baed8
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,21 @@ private ValidationReport performValidation(List<Shape> shapes, boolean validateE
planNode.receiveLogger(validationExecutionLogger);
}

// Important to start measuring time before we call .iterator() since the initialisation of the
// iterator will already do a lot of work if there is for instance a Sort in the pipeline
// because Sort (among others) will consume its parent iterator and sort the results on
// initialization!
long before = 0;
if (sail.isPerformanceLogging()) {
before = System.currentTimeMillis();
}

try (CloseableIteration<? extends ValidationTuple, SailException> iterator = planNode
.iterator()) {
if (GlobalValidationExecutionLogging.loggingEnabled) {
logger.info("Start execution of plan:\n{}\n", shapePlanNodeTuple.getShape().toString());
}

long before = 0;
if (sail.isPerformanceLogging()) {
before = System.currentTimeMillis();
}

ValidationResultIterator validationResults;
try {
validationResults = new ValidationResultIterator(iterator,
Expand Down

0 comments on commit 77baed8

Please sign in to comment.