diff options
Diffstat (limited to 'subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java')
-rw-r--r-- | subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java index 483d24f6..eb7ab204 100644 --- a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java +++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java | |||
@@ -54,7 +54,10 @@ public class SemanticsService extends AbstractCachedService<SemanticsResult> { | |||
54 | 54 | ||
55 | @Override | 55 | @Override |
56 | public SemanticsResult compute(IXtextWebDocument doc, CancelIndicator cancelIndicator) { | 56 | public SemanticsResult compute(IXtextWebDocument doc, CancelIndicator cancelIndicator) { |
57 | long start = System.currentTimeMillis(); | 57 | long start = 0; |
58 | if (LOG.isTraceEnabled()) { | ||
59 | start = System.currentTimeMillis(); | ||
60 | } | ||
58 | Problem problem = getProblem(doc, cancelIndicator); | 61 | Problem problem = getProblem(doc, cancelIndicator); |
59 | if (problem == null) { | 62 | if (problem == null) { |
60 | return null; | 63 | return null; |
@@ -73,8 +76,11 @@ public class SemanticsService extends AbstractCachedService<SemanticsResult> { | |||
73 | var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed); | 76 | var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed); |
74 | operationCanceledManager.checkCanceled(cancelIndicator); | 77 | operationCanceledManager.checkCanceled(cancelIndicator); |
75 | var partialInterpretation = getPartialInterpretation(initializer, model, cancelIndicator); | 78 | var partialInterpretation = getPartialInterpretation(initializer, model, cancelIndicator); |
76 | long end = System.currentTimeMillis(); | 79 | if (LOG.isTraceEnabled()) { |
77 | LOG.info("Computed semantics for {} ({}) in {}ms", doc.getResourceId(), doc.getStateId(), end - start); | 80 | long end = System.currentTimeMillis(); |
81 | LOG.trace("Computed semantics for {} ({}) in {}ms", doc.getResourceId(), doc.getStateId(), | ||
82 | end - start); | ||
83 | } | ||
78 | return new SemanticsSuccessResult(nodeTrace, partialInterpretation); | 84 | return new SemanticsSuccessResult(nodeTrace, partialInterpretation); |
79 | } catch (RuntimeException e) { | 85 | } catch (RuntimeException e) { |
80 | LOG.error("Error while computing semantics", e); | 86 | LOG.error("Error while computing semantics", e); |