当前位置: 首页>>代码示例>>Java>>正文


Java GroupThreads类代码示例

本文整理汇总了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;
    }
}
 
开发者ID:JCTools,项目名称:JCTools,代码行数:23,代码来源:MpscProxyChannelBenchmark.java

示例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;
  });
}
 
开发者ID:tramchamploo,项目名称:buffer-slayer,代码行数:9,代码来源:SizeBoundedQueueBenchmark.java

示例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;
  });
}
 
开发者ID:tramchamploo,项目名称:buffer-slayer,代码行数:9,代码来源:SizeBoundedQueueBenchmark.java

示例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;
  });
}
 
开发者ID:tramchamploo,项目名称:buffer-slayer,代码行数:9,代码来源:SizeBoundedQueueBenchmark.java

示例5: writing

import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Group("g")
   @GroupThreads(3)
public void writing()
{
	concurrentLinkedQueue.offer("test");
}
 
开发者ID:ThomasKrieger,项目名称:benchmarks,代码行数:8,代码来源:QueueBenchmark.java

示例6: reading

import org.openjdk.jmh.annotations.GroupThreads; //导入依赖的package包/类
@Benchmark
@Group("g")
   @GroupThreads(1)
public void reading()
{
	concurrentLinkedQueue.poll();
}
 
开发者ID:ThomasKrieger,项目名称:benchmarks,代码行数:8,代码来源:QueueBenchmark.java

示例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++;
  }
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:9,代码来源:ByteBoundedQueueBenchmarks.java

示例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);
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:8,代码来源:ByteBoundedQueueBenchmarks.java

示例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++;
  }
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:9,代码来源:ByteBoundedQueueBenchmarks.java

示例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);
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:8,代码来源:ByteBoundedQueueBenchmarks.java

示例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++;
  }
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:9,代码来源:ByteBoundedQueueBenchmarks.java

示例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);
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:8,代码来源:ByteBoundedQueueBenchmarks.java

示例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);
}
 
开发者ID:resilience4j,项目名称:resilience4j,代码行数:10,代码来源:CircularBufferBenchmark.java

示例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);
}
 
开发者ID:resilience4j,项目名称:resilience4j,代码行数:11,代码来源:CircularBufferBenchmark.java

示例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);
}
 
开发者ID:resilience4j,项目名称:resilience4j,代码行数:11,代码来源:CircularBufferBenchmark.java


注:本文中的org.openjdk.jmh.annotations.GroupThreads类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。