Skip to content
Snippets Groups Projects
Commit c6ef2f2c authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Added JavaDoc and comments.

parent 6a23b17e
No related branches found
No related tags found
No related merge requests found
......@@ -7,3 +7,4 @@
/.gradle/2.1/taskArtifacts/taskArtifacts.bin
/.project
/.settings/org.eclipse.jdt.core.prefs
/bin/
......@@ -23,17 +23,25 @@ import java.util.List;
import kieker.gui.model.importer.ImportAnalysisConfiguration;
import teetime.framework.Analysis;
/**
* A container for data used within this application.
*
* @author Nils Christian Ehmke
*/
public final class DataSource {
private List<RecordEntry> records = Collections.emptyList();
private List<ExecutionEntry> traces = Collections.emptyList();
public void loadMonitoringLogFromFS(final String directory) {
final ImportAnalysisConfiguration analysisConfiguration = new ImportAnalysisConfiguration(new File(directory));
// Load and analyze the monitoring logs from the given directory
final File importDirectory = new File(directory);
final ImportAnalysisConfiguration analysisConfiguration = new ImportAnalysisConfiguration(importDirectory);
final Analysis analysis = new Analysis(analysisConfiguration);
analysis.init();
analysis.start();
// Store the results from the analysis
this.records = analysisConfiguration.getRecordsList();
this.traces = analysisConfiguration.getTracesList();
}
......
......@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* A simplified representation of an execution within a trace.
* A simplified representation of an execution within a trace. As an instance of this class can contain other instances, it can be used to represent a trace tree.
*
* @author Nils Christian Ehmke
*/
......
/***************************************************************************
* Copyright 2014 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.gui.model;
import java.util.Observable;
public class Properties extends Observable {
/**
* An observable singleton container for properties used within this application.
*
* @author Nils Christian Ehmke
*/
public final class Properties extends Observable {
private static final Properties INSTANCE = new Properties();
private boolean shortComponentNames = false;
......
......@@ -26,7 +26,7 @@ public final class RecordEntry {
private final long timestamp;
private final String type;
private final String representation;
public RecordEntry(final long timestamp, final String type, final String representation) {
this.timestamp = timestamp;
this.type = type;
......
/***************************************************************************
* Copyright 2014 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.gui.model.importer;
import java.io.File;
......@@ -21,7 +37,12 @@ import teetime.stage.InstanceOfFilter;
import teetime.stage.className.ClassNameRegistryRepository;
import teetime.stage.io.filesystem.Dir2RecordsFilter;
public class ImportAnalysisConfiguration extends AnalysisConfiguration {
/**
* A configuration for the import and analysis of monitoring logs.
*
* @author Nils Christian Ehmke
*/
public final class ImportAnalysisConfiguration extends AnalysisConfiguration {
private final List<RecordEntry> recordsList = new Vector<>(100000);
private final List<ExecutionEntry> tracesList = new Vector<>(100000);
......@@ -47,6 +68,7 @@ public class ImportAnalysisConfiguration extends AnalysisConfiguration {
pipeFactory.create(distributor.getSecondOutputPort(), traceReconstructor.getInputPort());
pipeFactory.create(traceReconstructor.getOutputPort(), traceCollector.getInputPort());
// Make sure that the producer is executed by the analysis
super.addThreadableStage(producer);
}
......
......@@ -24,7 +24,7 @@ import teetime.framework.OutputPort;
*
* @author Nils Christian Ehmke
*/
public class Cloner<T> extends AbstractConsumerStage<T> {
public final class Cloner<T> extends AbstractConsumerStage<T> {
private final OutputPort<T> firstOutputPort = super.createOutputPort();
private final OutputPort<T> secondOutputPort = super.createOutputPort();
......
......@@ -32,11 +32,10 @@ import teetime.framework.AbstractConsumerStage;
import teetime.framework.OutputPort;
/**
* 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
*/
*/
public final class TraceReconstructor extends AbstractConsumerStage<IFlowRecord> {
private final OutputPort<ExecutionEntry> outputPort = super.createOutputPort();
......@@ -73,7 +72,7 @@ public final class TraceReconstructor extends AbstractConsumerStage<IFlowRecord>
return this.outputPort;
}
private static class TraceBuffer {
private final static class TraceBuffer {
private final String hostname;
private final Deque<BeforeOperationEvent> stack = new LinkedList<>();
......@@ -95,12 +94,10 @@ public final class TraceReconstructor extends AbstractConsumerStage<IFlowRecord>
private void handleBeforeOperationEventRecord(final BeforeOperationEvent record) {
this.stack.push(record);
final ExecutionEntry newExecutionEntry;
final ExecutionEntry newExecutionEntry = new ExecutionEntry(record.getTraceId(), this.hostname, record.getClassSignature(), record.getOperationSignature());
if (this.root == null) {
newExecutionEntry = new ExecutionEntry(record.getTraceId(), this.hostname, record.getClassSignature(), record.getOperationSignature());
this.root = newExecutionEntry;
} else {
newExecutionEntry = new ExecutionEntry(record.getTraceId(), this.hostname, record.getClassSignature(), record.getOperationSignature());
this.header.addExecutionEntry(newExecutionEntry);
}
this.header = newExecutionEntry;
......
/***************************************************************************
* Copyright 2014 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.gui.view;
import java.util.ArrayList;
......@@ -47,6 +63,8 @@ import org.eclipse.swt.widgets.Widget;
import org.eclipse.wb.swt.SWTResourceManager;
/**
* The main window of this application. This file should probably be maintained with the Eclipse GUI builder.
*
* @author Nils Christian Ehmke
*/
public class MainWindow {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment