@Override public long getStartTimestamp() { return this.getMinTin(); }
/** * Processes the pending traces in the timeout queue: Either those, * that timed out are all, if the filter was requested to terminate. * * @throws ExecutionEventProcessingException */ private void processTimeoutQueue() throws ExecutionEventProcessingException { synchronized (this.timeoutMap) { while (!this.timeoutMap.isEmpty() && (this.terminated || ((this.maxTout - this.timeoutMap.first().getMinTin()) > this.maxTraceDuration))) { final ExecutionTrace polledTrace = this.timeoutMap.pollFirst(); final long curTraceId = polledTrace.getTraceId(); this.pendingTraces.remove(curTraceId); this.processExecutionTrace(polledTrace); } } }
/** * Tests whether the "well-known" Bookstore trace gets correctly * represented as an Execution Trace. * * @throws InvalidTraceException * If the internally assembled execution trace is somehow invalid. */ @Test public void testValidExecutionTrace() throws InvalidTraceException { final ExecutionTrace executionTrace = this.genValidBookstoreTrace(); // Perform some validity checks on the execution trace object Assert.assertEquals("Invalid length of Execution Trace", executionTrace.getLength(), this.numExecutions); Assert.assertEquals("Invalid maximum stack depth", executionTrace.getMaxEss(), 2); Assert.assertEquals("Invalid minimum tin timestamp", executionTrace.getMinTin(), this.minTin); Assert.assertEquals("Invalid maximum tout timestamp", executionTrace.getMaxTout(), this.maxTout); }
configuration.setProperty(TraceReconstructionFilter.CONFIG_PROPERTY_NAME_IGNORE_INVALID_TRACES, "true"); configuration.setProperty(TraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_DURATION, Long .toString((triggerExecutionTrace.getMaxTout() - incompleteExecutionTrace.getMinTin()) - 1)); final TraceReconstructionFilter filter = new TraceReconstructionFilter(configuration, controller); + triggerExecutionTrace.getMaxTout() + "\n" + "incompleteExecutionTrace.getMinTin()" + incompleteExecutionTrace.getMinTin() + "\n" + "filter.getMaxTraceDurationNanos()" + filter.getMaxTraceDuration(), (triggerExecutionTrace.getMaxTout() - incompleteExecutionTrace .getMinTin()) > filter.getMaxTraceDuration());