Search in sources :

Example 1 with TaskEvent

use of io.zeebe.broker.taskqueue.data.TaskEvent in project zeebe by zeebe-io.

the class POJOMappingBenchmark method performReadingReverseOrder.

@Benchmark
@Threads(1)
public void performReadingReverseOrder(POJOMappingContext ctx) {
    final TaskEvent taskEvent = ctx.getTaskEvent();
    final DirectBuffer encodedTaskEvent = ctx.getReverseOrderEncodedTaskEvent();
    taskEvent.reset();
    taskEvent.wrap(encodedTaskEvent, 0, encodedTaskEvent.capacity());
}
Also used : MutableDirectBuffer(org.agrona.MutableDirectBuffer) DirectBuffer(org.agrona.DirectBuffer) TaskEvent(io.zeebe.broker.taskqueue.data.TaskEvent) Threads(org.openjdk.jmh.annotations.Threads) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Example 2 with TaskEvent

use of io.zeebe.broker.taskqueue.data.TaskEvent in project zeebe by zeebe-io.

the class POJOMappingBenchmark method performReadingOptimalOrder.

@Benchmark
@Threads(1)
public void performReadingOptimalOrder(POJOMappingContext ctx) {
    final TaskEvent taskEvent = ctx.getTaskEvent();
    final DirectBuffer encodedTaskEvent = ctx.getOptimalOrderEncodedTaskEvent();
    taskEvent.reset();
    taskEvent.wrap(encodedTaskEvent, 0, encodedTaskEvent.capacity());
}
Also used : MutableDirectBuffer(org.agrona.MutableDirectBuffer) DirectBuffer(org.agrona.DirectBuffer) TaskEvent(io.zeebe.broker.taskqueue.data.TaskEvent) Threads(org.openjdk.jmh.annotations.Threads) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Example 3 with TaskEvent

use of io.zeebe.broker.taskqueue.data.TaskEvent in project zeebe by zeebe-io.

the class POJOMappingBenchmark method performMappingCycleReverseEncodedOrder.

@Benchmark
@Threads(1)
public void performMappingCycleReverseEncodedOrder(POJOMappingContext ctx) throws Exception {
    final TaskEvent taskEvent = ctx.getTaskEvent();
    final DirectBuffer encodedTaskEvent = ctx.getReverseOrderEncodedTaskEvent();
    final MutableDirectBuffer writeBuffer = ctx.getWriteBuffer();
    taskEvent.reset();
    taskEvent.wrap(encodedTaskEvent, 0, encodedTaskEvent.capacity());
    taskEvent.write(writeBuffer, 0);
}
Also used : MutableDirectBuffer(org.agrona.MutableDirectBuffer) DirectBuffer(org.agrona.DirectBuffer) TaskEvent(io.zeebe.broker.taskqueue.data.TaskEvent) MutableDirectBuffer(org.agrona.MutableDirectBuffer) Threads(org.openjdk.jmh.annotations.Threads) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Example 4 with TaskEvent

use of io.zeebe.broker.taskqueue.data.TaskEvent in project zeebe by zeebe-io.

the class POJOMappingBenchmark method performMappingCycleOptimalEncodedOrder.

@Benchmark
@Threads(1)
public void performMappingCycleOptimalEncodedOrder(POJOMappingContext ctx) throws Exception {
    final TaskEvent taskEvent = ctx.getTaskEvent();
    final DirectBuffer encodedTaskEvent = ctx.getOptimalOrderEncodedTaskEvent();
    final MutableDirectBuffer writeBuffer = ctx.getWriteBuffer();
    taskEvent.reset();
    taskEvent.wrap(encodedTaskEvent, 0, encodedTaskEvent.capacity());
    taskEvent.write(writeBuffer, 0);
}
Also used : MutableDirectBuffer(org.agrona.MutableDirectBuffer) DirectBuffer(org.agrona.DirectBuffer) TaskEvent(io.zeebe.broker.taskqueue.data.TaskEvent) MutableDirectBuffer(org.agrona.MutableDirectBuffer) Threads(org.openjdk.jmh.annotations.Threads) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Aggregations

TaskEvent (io.zeebe.broker.taskqueue.data.TaskEvent)4 DirectBuffer (org.agrona.DirectBuffer)4 MutableDirectBuffer (org.agrona.MutableDirectBuffer)4 Benchmark (org.openjdk.jmh.annotations.Benchmark)4 Threads (org.openjdk.jmh.annotations.Threads)4