diff --git a/src/main/java/kieker/diagnosis/domain/OperationCall.java b/src/main/java/kieker/diagnosis/domain/OperationCall.java index 5d87b22159835062d0289da2dc1b96cf025833a2..14bbb4df11647f973a12b722cf71d9e4ce5361ec 100644 --- a/src/main/java/kieker/diagnosis/domain/OperationCall.java +++ b/src/main/java/kieker/diagnosis/domain/OperationCall.java @@ -17,9 +17,10 @@ package kieker.diagnosis.domain; /** - * This class represents a concrete operation call within this application. It adds some properties that are only required for concrete operation calls, like the trace ID and the + * This class represents a concrete operation call within this application. It adds some properties that are only required for concrete operation calls, like the + * trace ID and the * duration. It extends the call tree mechanism (inherited from {@link AbstractOperationCall}) by a parent, allowing to navigate in both directions within the tree. - * + * * @author Nils Christian Ehmke */ public final class OperationCall extends AbstractOperationCall<OperationCall> { @@ -29,15 +30,13 @@ public final class OperationCall extends AbstractOperationCall<OperationCall> { private OperationCall parent; private float percent; private long duration; + private long timestamp; - public OperationCall(final String container, final String component, final String operation, final long traceID) { - this(container, component, operation, traceID, null); - } - - public OperationCall(final String container, final String component, final String operation, final long traceID, final String failedCause) { - super(container, component, operation, failedCause); + public OperationCall(final String container, final String component, final String operation, final long traceID, final long timestamp) { + super(container, component, operation, null); this.traceID = traceID; + this.timestamp = timestamp; } @Override @@ -70,4 +69,12 @@ public final class OperationCall extends AbstractOperationCall<OperationCall> { return this.traceID; } + public long getTimestamp() { + return timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + } diff --git a/src/main/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructor.java b/src/main/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructor.java index be2e0d7bff3970f7d023b175472befcab12d0999..ed8ac1ff3b35532725866dd2c37209049faa13fd 100644 --- a/src/main/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructor.java +++ b/src/main/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructor.java @@ -82,10 +82,11 @@ final class LegacyTraceReconstructor extends AbstractStage<OperationExecutionRec int ess = 0; for (final OperationExecutionRecord record : this.records) { final OperationCall newCall = new OperationCall(record.getHostname(), this.extractComponent(record.getOperationSignature()), record.getOperationSignature(), - this.traceID); + this.traceID, record.getLoggingTimestamp()); newCall.setDuration(record.getTout() - record.getTin()); - // There can be "jumps" in the ess, as the operation execution records do not log the return jumps of methods. Therefore multiple of these jumps can be hidden. + // There can be "jumps" in the ess, as the operation execution records do not log the return jumps of methods. Therefore multiple of these jumps can + // be hidden. int currentEss = record.getEss(); while ((currentEss <= ess) && (ess != 0)) { header = header.getParent(); diff --git a/src/main/java/kieker/diagnosis/model/importer/stages/TraceReconstructor.java b/src/main/java/kieker/diagnosis/model/importer/stages/TraceReconstructor.java index b497b2390f246affb75e76d684923887059b4611..69db2081ae242142ce7db47d94da7f54f0e088db 100644 --- a/src/main/java/kieker/diagnosis/model/importer/stages/TraceReconstructor.java +++ b/src/main/java/kieker/diagnosis/model/importer/stages/TraceReconstructor.java @@ -31,8 +31,8 @@ import kieker.diagnosis.domain.OperationCall; import kieker.diagnosis.domain.Trace; /** - * Reconstruct traces based on the incoming instances of {@code IFlowRecord}. Currently only {@link TraceMetadata}, {@link BeforeOperationEvent} and {@link AfterOperationEvent} - * instances are supported. + * Reconstruct traces based on the incoming instances of {@code IFlowRecord}. Currently only {@link TraceMetadata}, {@link BeforeOperationEvent} and + * {@link AfterOperationEvent} instances are supported. * * @author Nils Christian Ehmke */ @@ -91,7 +91,7 @@ final class TraceReconstructor extends AbstractStage<IFlowRecord, Trace> { private void handleBeforeOperationEventRecord(final BeforeOperationEvent record) { this.stack.push(record); - final OperationCall newCall = new OperationCall(this.hostname, record.getClassSignature(), record.getOperationSignature(), this.traceID); + final OperationCall newCall = new OperationCall(this.hostname, record.getClassSignature(), record.getOperationSignature(), this.traceID, record.getLoggingTimestamp()); if (this.root == null) { this.root = newCall; } else { diff --git a/src/main/java/kieker/diagnosis/subview/calls/View.java b/src/main/java/kieker/diagnosis/subview/calls/View.java index ef661704f01e705c3ee6019d6177effb66b47b81..9f4f8fc414f547a62fba7c04b533d59c32ce7b6e 100644 --- a/src/main/java/kieker/diagnosis/subview/calls/View.java +++ b/src/main/java/kieker/diagnosis/subview/calls/View.java @@ -29,6 +29,7 @@ import kieker.diagnosis.subview.calls.util.ComponentSortListener; import kieker.diagnosis.subview.calls.util.ContainerSortListener; import kieker.diagnosis.subview.calls.util.DurationSortListener; import kieker.diagnosis.subview.calls.util.OperationSortListener; +import kieker.diagnosis.subview.calls.util.TimestampSortListener; import kieker.diagnosis.subview.calls.util.TraceIDSortListener; import kieker.diagnosis.subview.util.IModel; import kieker.diagnosis.subview.util.NameConverter; @@ -122,6 +123,10 @@ public final class View implements ISubView, Observer { tblclmnTotalDuration.setWidth(100); tblclmnTotalDuration.setText("Trace ID"); + final TableColumn tblclmnTimestamp = new TableColumn(this.table, SWT.NONE); + tblclmnTimestamp.setWidth(100); + tblclmnTimestamp.setText("Timestamp"); + this.detailComposite = new Composite(sashForm, SWT.BORDER); this.detailComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE)); this.detailComposite.setLayout(new GridLayout(2, false)); @@ -181,6 +186,7 @@ public final class View implements ISubView, Observer { tblclmnOperation.addSelectionListener(new OperationSortListener()); tblclmnMinimalDuration.addSelectionListener(new DurationSortListener()); tblclmnTotalDuration.addSelectionListener(new TraceIDSortListener()); + tblclmnTimestamp.addSelectionListener(new TimestampSortListener()); } @Override @@ -276,7 +282,8 @@ public final class View implements ISubView, Observer { final String shortTimeUnit = NameConverter.toShortTimeUnit(View.this.propertiesModel.getTimeUnit()); final long duration = View.this.propertiesModel.getTimeUnit().convert(call.getDuration(), View.this.modelProxy.getSourceTimeUnit()); - item.setText(new String[] { call.getContainer(), componentName, operationString, Long.toString(duration) + " " + shortTimeUnit, Long.toString(call.getTraceID()) }); + item.setText(new String[] { call.getContainer(), componentName, operationString, Long.toString(duration) + " " + shortTimeUnit, Long.toString(call.getTraceID()), + Long.toString(call.getTimestamp()) }); if (call.isFailed()) { final Color colorRed = Display.getCurrent().getSystemColor(SWT.COLOR_RED); diff --git a/src/main/java/kieker/diagnosis/subview/calls/util/TimestampSortListener.java b/src/main/java/kieker/diagnosis/subview/calls/util/TimestampSortListener.java new file mode 100644 index 0000000000000000000000000000000000000000..73af3a3ef944523e20a5f394b171c73aefcea89e --- /dev/null +++ b/src/main/java/kieker/diagnosis/subview/calls/util/TimestampSortListener.java @@ -0,0 +1,31 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.diagnosis.subview.calls.util; + +import kieker.diagnosis.domain.OperationCall; +import kieker.diagnosis.subview.util.AbstractCallTableColumnSortListener; + +public final class TimestampSortListener extends AbstractCallTableColumnSortListener<OperationCall> { + + private static final long serialVersionUID = 1L; + + @Override + protected int compare(final OperationCall fstCall, final OperationCall sndCall) { + return Long.compare(fstCall.getTimestamp(), sndCall.getTimestamp()); + } + +} diff --git a/src/main/java/kieker/diagnosis/subview/traces/View.java b/src/main/java/kieker/diagnosis/subview/traces/View.java index e9437303c65d6c1960ad924898b538a1e0192fd4..4c0ffc4e909811b1a3e3066ab50359df58e431bc 100644 --- a/src/main/java/kieker/diagnosis/subview/traces/View.java +++ b/src/main/java/kieker/diagnosis/subview/traces/View.java @@ -27,6 +27,7 @@ import kieker.diagnosis.model.PropertiesModel.ComponentNames; import kieker.diagnosis.model.PropertiesModel.OperationNames; import kieker.diagnosis.subview.ISubView; import kieker.diagnosis.subview.traces.util.DurationSortListener; +import kieker.diagnosis.subview.traces.util.TimestampSortListener; import kieker.diagnosis.subview.traces.util.TraceIDSortListener; import kieker.diagnosis.subview.util.ComponentSortListener; import kieker.diagnosis.subview.util.ContainerSortListener; @@ -136,10 +137,14 @@ public final class View implements Observer, ISubView { trclmnPercent.setWidth(100); trclmnPercent.setText("Percent"); - final TreeColumn trclmnTraceId = new TreeColumn(this.tree, SWT.NONE); + final TreeColumn trclmnTraceId = new TreeColumn(this.tree, SWT.RIGHT); trclmnTraceId.setWidth(100); trclmnTraceId.setText("Trace ID"); + final TreeColumn trclmnTimestamp = new TreeColumn(this.tree, SWT.NONE); + trclmnTimestamp.setWidth(100); + trclmnTimestamp.setText("Timestamp"); + this.detailComposite = new Composite(sashForm, SWT.BORDER); this.detailComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE)); this.detailComposite.setLayout(new GridLayout(2, false)); @@ -228,6 +233,7 @@ public final class View implements Observer, ISubView { trclmnTraceId.addSelectionListener(new TraceIDSortListener()); trclmnTraceDepth.addSelectionListener(new TraceDepthSortListener()); trclmnTraceSize.addSelectionListener(new TraceSizeSortListener()); + trclmnTimestamp.addSelectionListener(new TimestampSortListener()); } public Tree getTree() { @@ -343,7 +349,7 @@ public final class View implements Observer, ISubView { final String durationString = duration + " " + shortTimeUnit; item.setText(new String[] { call.getContainer(), componentName, operationString, Integer.toString(call.getStackDepth()), Integer.toString(call.getStackSize()), - durationString, String.format("%.1f%%", call.getPercent()), traceID }); + durationString, String.format("%.1f%%", call.getPercent()), traceID, Long.toString(call.getTimestamp()) }); if (call.isFailed()) { final Color colorRed = Display.getCurrent().getSystemColor(SWT.COLOR_RED); diff --git a/src/main/java/kieker/diagnosis/subview/traces/util/TimestampSortListener.java b/src/main/java/kieker/diagnosis/subview/traces/util/TimestampSortListener.java new file mode 100644 index 0000000000000000000000000000000000000000..f7c478a8ee2166b82714b810c02b18d9b7d81e8d --- /dev/null +++ b/src/main/java/kieker/diagnosis/subview/traces/util/TimestampSortListener.java @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.diagnosis.subview.traces.util; + +import kieker.diagnosis.domain.Trace; +import kieker.diagnosis.subview.util.AbstractTraceTreeColumnSortListener; + +public final class TimestampSortListener extends AbstractTraceTreeColumnSortListener<Trace> { + + private static final long serialVersionUID = 1L; + + @Override + protected int compare(final Trace fstTrace, final Trace sndTrace) { + final long fstTimestamp = fstTrace.getRootOperationCall().getTimestamp(); + final long sndTimestamp = sndTrace.getRootOperationCall().getTimestamp(); + + return Long.compare(fstTimestamp, sndTimestamp); + } + +} diff --git a/src/test/java/kieker/diagnosis/domain/AggregatedOperationCallTest.java b/src/test/java/kieker/diagnosis/domain/AggregatedOperationCallTest.java index 7ffb72300a682007c68c72c4a678a063e2105609..cae9a82a0792d9470bcb40b2ed0c2978d84b03ad 100644 --- a/src/test/java/kieker/diagnosis/domain/AggregatedOperationCallTest.java +++ b/src/test/java/kieker/diagnosis/domain/AggregatedOperationCallTest.java @@ -18,8 +18,6 @@ package kieker.diagnosis.domain; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; -import kieker.diagnosis.domain.AggregatedOperationCall; -import kieker.diagnosis.domain.OperationCall; import org.junit.Test; @@ -27,7 +25,7 @@ public final class AggregatedOperationCallTest extends AbstractOperationCallTest @Test public void constructorShouldCopySingleOperationCall() { - final OperationCall call = new OperationCall("container", "component", "operation", 42); + final OperationCall call = new OperationCall("container", "component", "operation", 42, 0); final AggregatedOperationCall aggregatedCall = new AggregatedOperationCall(call); assertThat(aggregatedCall.getContainer(), is("container")); @@ -37,9 +35,9 @@ public final class AggregatedOperationCallTest extends AbstractOperationCallTest @Test public void constructorShouldCopyNestedOperationCall() { - final OperationCall call = new OperationCall("container", "component", "operation", 42); - call.addChild(new OperationCall("container1", "component1", "operation1", 42)); - call.addChild(new OperationCall("container2", "component2", "operation2", 42)); + final OperationCall call = new OperationCall("container", "component", "operation", 42, 0); + call.addChild(new OperationCall("container1", "component1", "operation1", 42, 0)); + call.addChild(new OperationCall("container2", "component2", "operation2", 42, 0)); final AggregatedOperationCall aggregatedCall = new AggregatedOperationCall(call); @@ -58,7 +56,7 @@ public final class AggregatedOperationCallTest extends AbstractOperationCallTest @Test public void constructorShouldCopyStatistics() { - final OperationCall call = new OperationCall("container", "component", "operation", 42); + final OperationCall call = new OperationCall("container", "component", "operation", 42, 0); call.setStackSize(1); final AggregatedOperationCall aggregatedCall = new AggregatedOperationCall(call); @@ -68,7 +66,7 @@ public final class AggregatedOperationCallTest extends AbstractOperationCallTest @Override protected AggregatedOperationCall createOperationCall(final String container, final String component, final String operation) { - return new AggregatedOperationCall(new OperationCall(container, component, operation, -1)); + return new AggregatedOperationCall(new OperationCall(container, component, operation, -1, 0)); } } diff --git a/src/test/java/kieker/diagnosis/domain/OperationCallTest.java b/src/test/java/kieker/diagnosis/domain/OperationCallTest.java index 7973d57e8b85d0e102724bbef5682cd4007e9452..fe6b0758d4c7ad24c232700e751dc47ce5a94cbb 100644 --- a/src/test/java/kieker/diagnosis/domain/OperationCallTest.java +++ b/src/test/java/kieker/diagnosis/domain/OperationCallTest.java @@ -19,7 +19,6 @@ package kieker.diagnosis.domain; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; -import kieker.diagnosis.domain.OperationCall; import org.junit.Test; @@ -27,8 +26,8 @@ public final class OperationCallTest extends AbstractOperationCallTest<Operation @Test public void addingChildrenShouldUpdateTheParent() { - final OperationCall call = new OperationCall("", "", "", 42); - final OperationCall child = new OperationCall("", "", "", 42); + final OperationCall call = new OperationCall("", "", "", 42, 0); + final OperationCall child = new OperationCall("", "", "", 42, 0); call.addChild(child); @@ -37,16 +36,16 @@ public final class OperationCallTest extends AbstractOperationCallTest<Operation @Test public void equalsForDifferentTIDsShouldWork() { - final OperationCall fstCall = new OperationCall("container", "component", "operation", 42); - final OperationCall sndCall = new OperationCall("container", "component", "operation", 43); + final OperationCall fstCall = new OperationCall("container", "component", "operation", 42, 0); + final OperationCall sndCall = new OperationCall("container", "component", "operation", 43, 0); assertThat(fstCall, is(equalTo(sndCall))); } @Test public void equalsForDifferentDurationsShouldWork() { - final OperationCall fstCall = new OperationCall("container", "component", "operation", 42); - final OperationCall sndCall = new OperationCall("container", "component", "operation", 42); + final OperationCall fstCall = new OperationCall("container", "component", "operation", 42, 0); + final OperationCall sndCall = new OperationCall("container", "component", "operation", 42, 0); fstCall.setDuration(100); sndCall.setDuration(200); @@ -56,7 +55,7 @@ public final class OperationCallTest extends AbstractOperationCallTest<Operation @Override protected OperationCall createOperationCall(final String container, final String component, final String operation) { - return new OperationCall(container, component, operation, -1); + return new OperationCall(container, component, operation, -1, 0); } } diff --git a/src/test/java/kieker/diagnosis/model/importer/stages/AggregatedTraceStatisticsDecoratorTest.java b/src/test/java/kieker/diagnosis/model/importer/stages/AggregatedTraceStatisticsDecoratorTest.java index f7c6167abce1ebb2f316eef63bb1ba3f2e647c10..279ef59b45a491f40ae9eac40550796d2b3ee35b 100644 --- a/src/test/java/kieker/diagnosis/model/importer/stages/AggregatedTraceStatisticsDecoratorTest.java +++ b/src/test/java/kieker/diagnosis/model/importer/stages/AggregatedTraceStatisticsDecoratorTest.java @@ -24,7 +24,6 @@ import java.util.Arrays; import kieker.diagnosis.domain.AggregatedTrace; import kieker.diagnosis.domain.OperationCall; import kieker.diagnosis.domain.Trace; -import kieker.diagnosis.model.importer.stages.AggregatedTraceStatisticsDecorator; import org.junit.Test; @@ -32,9 +31,9 @@ public final class AggregatedTraceStatisticsDecoratorTest { @Test public void minMaxMeanAndAvgCalculationForSingleCallShouldWork() throws Exception { - final OperationCall call1 = new OperationCall("", "", "", 43); - final OperationCall call2 = new OperationCall("", "", "", 44); - final OperationCall call3 = new OperationCall("", "", "", 45); + final OperationCall call1 = new OperationCall("", "", "", 43, 0); + final OperationCall call2 = new OperationCall("", "", "", 44, 0); + final OperationCall call3 = new OperationCall("", "", "", 45, 0); call1.setDuration(15); call2.setDuration(7); diff --git a/src/test/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructorTest.java b/src/test/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructorTest.java index 2640bc39a961ad4c1fc6ce17dc561108158864a1..bf4c3aba403856ca6ac5efa8012df0088865fa22 100644 --- a/src/test/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructorTest.java +++ b/src/test/java/kieker/diagnosis/model/importer/stages/LegacyTraceReconstructorTest.java @@ -132,7 +132,7 @@ public class LegacyTraceReconstructorTest { final IPipeFactory pipeFactory = new SingleElementPipeFactory(); pipeFactory.create(producer.getOutputPort(), reader.getInputPort()); pipeFactory.create(reader.getOutputPort(), typeFilter.getInputPort()); - pipeFactory.create(typeFilter.getOutputPort(), reconstructor.getInputPort()); + pipeFactory.create(typeFilter.getMatchedOutputPort(), reconstructor.getInputPort()); pipeFactory.create(reconstructor.getOutputPort(), collector.getInputPort()); this.addThreadableStage(producer); diff --git a/src/test/java/kieker/diagnosis/model/importer/stages/TraceStatisticsDecoratorTest.java b/src/test/java/kieker/diagnosis/model/importer/stages/TraceStatisticsDecoratorTest.java index 91223246f735d5a821e9ec74e86db89d7ac29c19..91e120afbc8c38059ad50547f1afd56244c4db98 100644 --- a/src/test/java/kieker/diagnosis/model/importer/stages/TraceStatisticsDecoratorTest.java +++ b/src/test/java/kieker/diagnosis/model/importer/stages/TraceStatisticsDecoratorTest.java @@ -21,7 +21,6 @@ import static org.hamcrest.number.IsCloseTo.closeTo; import static org.junit.Assert.assertThat; import kieker.diagnosis.domain.OperationCall; import kieker.diagnosis.domain.Trace; -import kieker.diagnosis.model.importer.stages.TraceStatisticsDecorator; import org.junit.Test; @@ -29,11 +28,11 @@ public final class TraceStatisticsDecoratorTest { @Test public void percentCalculationShouldWork() throws Exception { - final OperationCall rootCall = new OperationCall("", "", "", 42); - final OperationCall child1 = new OperationCall("", "", "", 42); - final OperationCall child2 = new OperationCall("", "", "", 42); - final OperationCall child3 = new OperationCall("", "", "", 42); - final OperationCall child4 = new OperationCall("", "", "", 42); + final OperationCall rootCall = new OperationCall("", "", "", 42, 0); + final OperationCall child1 = new OperationCall("", "", "", 42, 0); + final OperationCall child2 = new OperationCall("", "", "", 42, 0); + final OperationCall child3 = new OperationCall("", "", "", 42, 0); + final OperationCall child4 = new OperationCall("", "", "", 42, 0); rootCall.setDuration(100); child1.setDuration(70); @@ -63,12 +62,12 @@ public final class TraceStatisticsDecoratorTest { @Test public void traceDepthCalculationInCommonCaseShouldWork() throws Exception { - final OperationCall rootCall = new OperationCall("", "", "", 1); + final OperationCall rootCall = new OperationCall("", "", "", 1, 0); - rootCall.addChild(new OperationCall("", "", "", 1)); - rootCall.addChild(new OperationCall("", "", "", 1)); + rootCall.addChild(new OperationCall("", "", "", 1, 0)); + rootCall.addChild(new OperationCall("", "", "", 1, 0)); - rootCall.getChildren().get(0).addChild(new OperationCall("", "", "", 1)); + rootCall.getChildren().get(0).addChild(new OperationCall("", "", "", 1, 0)); final Trace trace = new Trace(rootCall, 1); @@ -82,7 +81,7 @@ public final class TraceStatisticsDecoratorTest { @Test public void traceDepthCalculationForNoChildrenShouldWork() throws Exception { - final OperationCall rootCall = new OperationCall("", "", "", 1); + final OperationCall rootCall = new OperationCall("", "", "", 1, 0); final Trace trace = new Trace(rootCall, 1); @@ -96,12 +95,12 @@ public final class TraceStatisticsDecoratorTest { @Test public void traceSizeCalculationInCommonCaseShouldWork() throws Exception { - final OperationCall rootCall = new OperationCall("", "", "", 42); + final OperationCall rootCall = new OperationCall("", "", "", 42, 0); - final OperationCall child1 = new OperationCall("", "", "", 42); - final OperationCall child2 = new OperationCall("", "", "", 42); - final OperationCall child3 = new OperationCall("", "", "", 42); - final OperationCall child4 = new OperationCall("", "", "", 42); + final OperationCall child1 = new OperationCall("", "", "", 42, 0); + final OperationCall child2 = new OperationCall("", "", "", 42, 0); + final OperationCall child3 = new OperationCall("", "", "", 42, 0); + final OperationCall child4 = new OperationCall("", "", "", 42, 0); rootCall.addChild(child1); rootCall.addChild(child2); @@ -121,7 +120,7 @@ public final class TraceStatisticsDecoratorTest { @Test public void traceSizeCalculationForNoChildrenShouldWork() throws Exception { - final OperationCall rootCall = new OperationCall("", "", "", 1); + final OperationCall rootCall = new OperationCall("", "", "", 1, 0); final Trace trace = new Trace(rootCall, 1);