Search in sources :

Example 1 with IEventRecord

use of kieker.common.record.flow.IEventRecord in project iobserve-analysis by research-iobserve.

the class RewriteTime method execute.

@Override
protected void execute(final IMonitoringRecord element) throws Exception {
    if (this.timeDelta == null) {
        this.timeDelta = new Date().getTime() - element.getLoggingTimestamp();
    }
    element.setLoggingTimestamp(element.getLoggingTimestamp() + this.timeDelta);
    if (element instanceof IEventRecord) {
        final IEventRecord event = (IEventRecord) element;
        event.setTimestamp(event.getTimestamp() + this.timeDelta);
    }
    this.outputPort.send(element);
}
Also used : IEventRecord(kieker.common.record.flow.IEventRecord) Date(java.util.Date)

Example 2 with IEventRecord

use of kieker.common.record.flow.IEventRecord in project iobserve-analysis by research-iobserve.

the class TranslateCallOperationEventsStage method execute.

@Override
protected void execute(final IFlowRecord event) throws Exception {
    if (event instanceof CallOperationEvent) {
        final CallOperationEvent call = (CallOperationEvent) event;
        this.outputPort.send(new BeforeOperationEvent(call.getTimestamp(), call.getTraceId(), call.getOrderIndex(), call.getCalleeOperationSignature(), call.getCalleeClassSignature()));
        this.waitingList.add(new AfterOperationEvent(call.getTimestamp() + 1000 * 1000, call.getTraceId(), call.getOrderIndex(), call.getCalleeOperationSignature(), call.getCalleeClassSignature()));
        this.sendWaiting(call.getTimestamp());
    } else if (event instanceof IEventRecord) {
        this.sendWaiting(((IEventRecord) event).getTimestamp());
        this.outputPort.send(event);
    } else {
        this.outputPort.send(event);
    }
}
Also used : AfterOperationEvent(kieker.common.record.flow.trace.operation.AfterOperationEvent) CallOperationEvent(kieker.common.record.flow.trace.operation.CallOperationEvent) IEventRecord(kieker.common.record.flow.IEventRecord) BeforeOperationEvent(kieker.common.record.flow.trace.operation.BeforeOperationEvent)

Aggregations

IEventRecord (kieker.common.record.flow.IEventRecord)2 Date (java.util.Date)1 AfterOperationEvent (kieker.common.record.flow.trace.operation.AfterOperationEvent)1 BeforeOperationEvent (kieker.common.record.flow.trace.operation.BeforeOperationEvent)1 CallOperationEvent (kieker.common.record.flow.trace.operation.CallOperationEvent)1