Skip to content
Snippets Groups Projects
Commit 6c8ed67e authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Add log statistic for verifier

parent 3932ae3c
No related branches found
No related tags found
No related merge requests found
...@@ -12,9 +12,14 @@ import java.util.concurrent.Callable; ...@@ -12,9 +12,14 @@ import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.time.StopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractVerifier implements Verifier { public abstract class AbstractVerifier implements Verifier {
protected final Logger LOGGER = LoggerFactory.getLogger(getClass().getSimpleName());
protected VerificationType verificationType; protected VerificationType verificationType;
protected AbstractDmnVerifierConfig verifierConfig; protected AbstractDmnVerifierConfig verifierConfig;
protected VerifierResult.Builder resultBuilder; protected VerifierResult.Builder resultBuilder;
...@@ -55,9 +60,18 @@ public abstract class AbstractVerifier implements Verifier { ...@@ -55,9 +60,18 @@ public abstract class AbstractVerifier implements Verifier {
} }
private VerifierResult verify() { private VerifierResult verify() {
System.out.println("start " + this.getClass().getSimpleName()); LOGGER.info("Starting verification " + getVerificationType().getName());
StopWatch watch = new StopWatch();
watch.start();
doVerification(); doVerification();
System.out.println("end " + this.getClass().getSimpleName()); watch.stop();
LOGGER.info(
"Verification "
+ getVerificationType().getName()
+ " finished. "
+ "Time Elapsed: "
+ watch.getTime()
+ " ms");
return resultBuilder.build(); return resultBuilder.build();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment