Skip to content
Snippets Groups Projects
Commit a0b0696f authored by Jürgen Walter's avatar Jürgen Walter
Browse files

Added calculation of experiment end time

parent 515d101c
No related branches found
No related tags found
No related merge requests found
......@@ -4,24 +4,14 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.apache.log4j.Logger;
import kieker.common.configuration.Configuration;
import tools.descartes.dql.connector.kieker.configgenerator.XMLGenerationManager;
import tools.descartes.dql.connector.kieker.structures.Component;
import tools.descartes.dql.connector.kieker.structures.Trace;
import tools.descartes.dql.connector.kieker.structures.records.EventRecord;
import tools.descartes.dql.connector.kieker.structures.records.ResourceRecord;
import tools.descartes.dql.core.engine.util.DQLLogger;
import tools.descartes.dql.models.mapping.domain.ContinuousSeriesResult;
import tools.descartes.dql.models.mapping.domain.DomainFactory;
import tools.descartes.dql.models.mapping.domain.Entity;
import tools.descartes.dql.models.mapping.domain.Probe;
import tools.descartes.dql.models.mapping.domain.StatType;
import tools.descartes.dql.models.mapping.mapping.EntityMapping;
......@@ -233,6 +223,18 @@ public class KiekerManager {
return Math.min(firstEvent, firstResource);
}
public long getEndTime(){
long lastEvent = Long.MIN_VALUE;
long lastResource = Long.MIN_VALUE;
if (this.analysisResult.getEvents() != null && this.analysisResult.getEvents().size()>0){
lastEvent = this.analysisResult.getEvents().get(analysisResult.getEvents().size()-1).getTimestamp();
}
if (this.analysisResult.getResources() != null && this.analysisResult.getResources().size()>0){
lastResource = this.analysisResult.getResources().get(analysisResult.getEvents().size()-1).getTimestamp();
}
return Math.max(lastEvent, lastResource);
}
/**
* private method for logging events happening in KiekerManager
*/
......
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