use of org.openjdk.jmh.annotations.Fork in project ignite by apache.
the class JmhPageLockTrackerBenchmark method lockUnlock.
/**
* Mesure cost for (beforelock -> lock -> unlock) operation.
*/
@Benchmark
@BenchmarkMode(Mode.Throughput)
@Fork(1)
@Warmup(iterations = 10)
@Measurement(iterations = 10)
public // @OutputTimeUnit(TimeUnit.MICROSECONDS)
void lockUnlock(ThreadLocalState localState) {
PageLockListener pl = localState.pl;
for (int i = 0; i < localState.stackSize; i++) {
int pageId = i + 1;
pl.onBeforeReadLock(localState.StructureId, pageId, pageId);
pl.onReadLock(localState.StructureId, pageId, pageId, pageId);
}
for (int i = localState.stackSize; i > 0; i--) {
int pageId = i;
pl.onReadUnlock(localState.StructureId, pageId, pageId, pageId);
}
}
use of org.openjdk.jmh.annotations.Fork in project bookkeeper by apache.
the class DigestTypeBenchmark method digestManager.
@Benchmark
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Warmup(iterations = 2, time = 3, timeUnit = TimeUnit.SECONDS)
@Measurement(iterations = 5, time = 12, timeUnit = TimeUnit.SECONDS)
@Threads(2)
@Fork(value = 1, warmups = 1)
public void digestManager(MyState state) {
final ByteBuf buff = state.getByteBuff(state.bufferType);
final DigestManager dm = state.getDigestManager(state.digest);
dm.update(buff);
state.digestBuf.clear();
dm.populateValueAndReset(state.digestBuf);
}
use of org.openjdk.jmh.annotations.Fork in project testcases by coheigea.
the class EncryptionSerializerBenchmark method decryptionStaxSerializer.
@Benchmark
@Fork(1)
@Warmup(iterations = 5)
@Measurement(iterations = 20)
public void decryptionStaxSerializer() throws Exception {
Serializer serializer = new StaxSerializer();
Document encryptedDoc = doEncryption(null);
doDecryption(encryptedDoc, serializer);
}
use of org.openjdk.jmh.annotations.Fork in project testcases by coheigea.
the class EncryptionSerializerBenchmark method decryptionDefaultSerializer.
@Benchmark
@Fork(1)
@Warmup(iterations = 5)
@Measurement(iterations = 20)
public void decryptionDefaultSerializer() throws Exception {
Document encryptedDoc = doEncryption(null);
doDecryption(encryptedDoc, null);
}
use of org.openjdk.jmh.annotations.Fork in project spring-cloud-sleuth by spring-cloud.
the class HttpFilterBenchmarks method filterWithSleuth.
@Benchmark
@Measurement(iterations = 5, time = 1)
@Fork(3)
public void filterWithSleuth(BenchmarkContext context) throws ServletException, IOException {
MockHttpServletRequest request = builder().buildRequest(new MockServletContext());
MockHttpServletResponse response = new MockHttpServletResponse();
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
context.traceFilter.doFilter(request, response, new MockFilterChain());
}
Aggregations