use of org.openjdk.jmh.annotations.Threads 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());
}
use of org.openjdk.jmh.annotations.Threads in project apm-agent-java by elastic.
the class ObjectPoolBenchmark method testMixedObjectPool.
// @Benchmark
@Threads(8)
public Transaction testMixedObjectPool() {
Transaction transaction = mixedObjectPool.createInstance();
mixedObjectPool.recycle(transaction);
return transaction;
}
use of org.openjdk.jmh.annotations.Threads in project apm-agent-java by elastic.
the class ObjectPoolBenchmark method testThreadLocalObjectPool.
@Benchmark
@Threads(8)
public Transaction testThreadLocalObjectPool() {
Transaction transaction = threadLocalObjectPool.createInstance();
threadLocalObjectPool.recycle(transaction);
return transaction;
}
use of org.openjdk.jmh.annotations.Threads in project atlasdb by palantir.
the class TransactionGetRowsColumnRangeBenchmarks method getAllColumnsSingleBigRow.
@Benchmark
@Threads(1)
@Warmup(time = 16, timeUnit = TimeUnit.SECONDS)
@Measurement(time = 160, timeUnit = TimeUnit.SECONDS)
public Object getAllColumnsSingleBigRow(VeryWideRowTable table, Blackhole blackhole) {
return table.getTransactionManager().runTaskThrowOnConflict(txn -> {
Iterator<Map.Entry<Cell, byte[]>> iter = txn.getRowsColumnRange(table.getTableRef(), Collections.singleton(Tables.ROW_BYTES.array()), new ColumnRangeSelection(null, null), 10000);
int count = 0;
while (iter.hasNext()) {
blackhole.consume(iter.next());
++count;
}
Preconditions.checkState(count == table.getNumCols(), "Should be %s columns, but were: %s", table.getNumCols(), count);
return count;
});
}
use of org.openjdk.jmh.annotations.Threads in project atlasdb by palantir.
the class KvsGetRowsColumnRangeBenchmarks method getAllColumnsUnaligned.
@Benchmark
@Threads(1)
@Warmup(time = 16, timeUnit = TimeUnit.SECONDS)
@Measurement(time = 160, timeUnit = TimeUnit.SECONDS)
public Object getAllColumnsUnaligned(WideRowsTable table) {
List<byte[]> rows = IntStream.rangeClosed(0, WideRowsTable.NUM_ROWS - 1).mapToObj(WideRowsTable::getRow).collect(Collectors.toList());
RowColumnRangeIterator rowsColumnRange = table.getKvs().getRowsColumnRange(table.getTableRef(), rows, new ColumnRangeSelection(null, null), 10017, Long.MAX_VALUE);
int expectedNumCells = WideRowsTable.NUM_ROWS * WideRowsTable.NUM_COLS_PER_ROW;
List<Map.Entry<Cell, Value>> loadedCells = new ArrayList<>(expectedNumCells);
while (rowsColumnRange.hasNext()) {
loadedCells.add(rowsColumnRange.next());
}
Preconditions.checkState(loadedCells.size() == expectedNumCells, "Should be %s cells, but were: %s", expectedNumCells, loadedCells.size());
return loadedCells;
}
Aggregations