Skip to content
Snippets Groups Projects
Commit 876fb65a authored by Bjoern Weissenfels's avatar Bjoern Weissenfels
Browse files

add filter

parent e43e119b
No related branches found
No related tags found
No related merge requests found
......@@ -10,26 +10,26 @@ import kieker.common.record.system.MemSwapUsageRecord;
*/
public class DataEntry {
long timestamp;
int count;
double sumRespTime;
double sumIdle;
double sumIrq;
double sumNice;
double sumSystem;
double sumTotalUtilzation;
double sumUser;
double sumWait;
long sumMemFree;
long sumMemUsed;
long sumSwapFree;
long sumSwapUsed;
String hourMinSec;
String minSec;
String sec;
private long timestamp;
private int count;
private double sumRespTime;
private double sumIdle;
private double sumIrq;
private double sumNice;
private double sumSystem;
private double sumTotalUtilzation;
private double sumUser;
private double sumWait;
private long sumMemFree;
private long sumMemUsed;
private long sumSwapFree;
private long sumSwapUsed;
private String hourMinSec;
private String minSec;
private String sec;
public DataEntry(long timestamp){
this.timestamp = timestamp;
......@@ -51,6 +51,24 @@ public class DataEntry {
this.sumSwapUsed = 0;
}
public void mergeDataEntries(DataEntry dataEntry){
this.count += dataEntry.getCount();
this.sumRespTime += dataEntry.sumRespTime;
this.sumIdle += dataEntry.sumIdle;
this.sumIrq += dataEntry.sumIrq;
this.sumNice += dataEntry.sumNice;
this.sumSystem += dataEntry.sumSystem;
this.sumTotalUtilzation += dataEntry.sumTotalUtilzation;
this.sumUser += dataEntry.sumUser;
this.sumWait += dataEntry.sumWait;
this.sumMemFree += dataEntry.sumMemFree;
this.sumMemUsed += dataEntry.sumMemUsed;
this.sumSwapFree += dataEntry.sumSwapFree;
this.sumSwapUsed += dataEntry.sumSwapUsed;
}
public void addRecord(Record record){
this.count++;
this.sumRespTime += record.getResponseTime();
......
package livedemo.filter;
import kieker.analysis.IProjectContext;
import kieker.analysis.plugin.annotation.InputPort;
import kieker.analysis.plugin.annotation.OutputPort;
import kieker.analysis.plugin.annotation.Plugin;
import kieker.analysis.plugin.filter.AbstractFilterPlugin;
import kieker.common.configuration.Configuration;
import kieker.common.record.controlflow.OperationExecutionRecord;
import livedemo.entities.Record;
/**
* @author Bjoern Weissenfels
*/
@Plugin(description = "A filter that ",
outputPorts = @OutputPort(name = ListFilter.OUTPUT_PORT_NAME, eventTypes = { Record.class }, description = "Provides each incoming object"))
public class OER2RecordFilter extends AbstractFilterPlugin {
public static final String INPUT_PORT_NAME = "inputObject";
public static final String OUTPUT_PORT_NAME = "outputObjects";
public OER2RecordFilter(Configuration configuration,
IProjectContext projectContext) {
super(configuration, projectContext);
// TODO Auto-generated constructor stub
}
@InputPort(name = ListFilter.INPUT_PORT_NAME)
public synchronized void input(final OperationExecutionRecord operationExecutionRecord) {
Record record = new Record(operationExecutionRecord);
super.deliver(OUTPUT_PORT_NAME, record);
}
@Override
public Configuration getCurrentConfiguration() {
// TODO Auto-generated method stub
return null;
}
}
No preview for this file type
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment