本文整理汇总了Java中org.openjdk.jmh.annotations.GroupThreads类的典型用法代码示例。如果您正苦于以下问题:Java GroupThreads类的具体用法?Java GroupThreads怎么用?Java GroupThreads使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GroupThreads类属于org.openjdk.jmh.annotations包,在下文中一共展示了GroupThreads类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tenMixedArgsCaller
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Group("tenMixedArgs")
@GroupThreads(PRODUCER_THREADS)
public boolean tenMixedArgsCaller(final Control control, final CallerCounters counters) {
this.waitStrategy.control = control;
try {
this.proxy.tenMixedArgs(this.intArg,
this.objArg,
this.longArg,
this.customType0,
this.doubleArg,
this.customType1,
this.floatArg,
this.customType2,
this.booleanArg,
this.customType3);
counters.callsFailed = this.waitStrategy.retries;
return true;
} catch (final StoppedException e) {
return false;
}
}
示例2: no_contention_drain
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("no_contention") @GroupThreads(1)
public void no_contention_drain(DrainCounters counters, ConsumerMarker cm) {
q.drainTo(next -> {
counters.drained++;
next.deferred.resolve(null);
return true;
});
}
示例3: mild_contention_drain
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("mild_contention") @GroupThreads(1)
public void mild_contention_drain(DrainCounters counters, ConsumerMarker cm) {
q.drainTo(next -> {
counters.drained++;
next.deferred.resolve(null);
return true;
});
}
示例4: high_contention_drain
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("high_contention") @GroupThreads(1)
public void high_contention_drain(DrainCounters counters, ConsumerMarker cm) {
q.drainTo(next -> {
counters.drained++;
next.deferred.resolve(null);
return true;
});
}
示例5: writing
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Group("g")
@GroupThreads(3)
public void writing()
{
concurrentLinkedQueue.offer("test");
}
示例6: reading
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Group("g")
@GroupThreads(1)
public void reading()
{
concurrentLinkedQueue.poll();
}
示例7: no_contention_offer
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("no_contention") @GroupThreads(1)
public void no_contention_offer(OfferCounters counters) {
if (q.offer(ONE, 1)) {
counters.offersMade++;
} else {
counters.offersFailed++;
}
}
示例8: no_contention_drain
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("no_contention") @GroupThreads(1)
public void no_contention_drain(DrainCounters counters, ConsumerMarker cm) {
q.drainTo((s, b) -> {
counters.drained++;
return true;
}, 1000);
}
示例9: mild_contention_offer
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("mild_contention") @GroupThreads(2)
public void mild_contention_offer(OfferCounters counters) {
if (q.offer(ONE, 1)) {
counters.offersMade++;
} else {
counters.offersFailed++;
}
}
示例10: mild_contention_drain
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("mild_contention") @GroupThreads(1)
public void mild_contention_drain(DrainCounters counters, ConsumerMarker cm) {
q.drainTo((s, b) -> {
counters.drained++;
return true;
}, 1000);
}
示例11: high_contention_offer
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("high_contention") @GroupThreads(8)
public void high_contention_offer(OfferCounters counters) {
if (q.offer(ONE, 1)) {
counters.offersMade++;
} else {
counters.offersFailed++;
}
}
示例12: high_contention_drain
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark @Group("high_contention") @GroupThreads(1)
public void high_contention_drain(DrainCounters counters, ConsumerMarker cm) {
q.drainTo((s, b) -> {
counters.drained++;
return true;
}, 1000);
}
示例13: circularBufferAddEvent
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("circularBuffer")
@GroupThreads(1)
public void circularBufferAddEvent() {
circularFifoBuffer.add(event);
}
示例14: circularBufferToList
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("circularBuffer")
@GroupThreads(1)
public void circularBufferToList(Blackhole bh) {
List<Object> events = circularFifoBuffer.toList();
bh.consume(events);
}
示例15: circularBufferSize
import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("circularBuffer")
@GroupThreads(1)
public void circularBufferSize(Blackhole bh) {
int size = circularFifoBuffer.size();
bh.consume(size);
}