Commit f16dafe2 authored by Sören Henning's avatar Sören Henning

added RecordConverterStage with no 100% correct behavior

parent 95edd195
package anomalydetection.kieker;
import java.time.Instant;
import anomalydetection.measurement.Measurement;
import teetime.stage.basic.AbstractTransformation;
public class RecordConverterStage extends AbstractTransformation<MonitoringRecord, Measurement> {
@Override
protected void execute(final MonitoringRecord record) {
// TODO This is wrong! record.getTimestamp() delivers nanoseconds relative to
// an fixed arbitrary time...
final Instant time = Instant.ofEpochMilli(record.getTimestamp());
final double value = record.getDuration();
final Measurement measurement = new Measurement(time, value);
this.outputPort.send(measurement);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment