Java 类org.openjdk.jmh.annotations.GroupThreads 实例源码

项目:JCTools    文件:MpscProxyChannelBenchmark.java   
@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;
    }
}
项目:buffer-slayer    文件:SizeBoundedQueueBenchmark.java   
@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;
  });
}
项目:buffer-slayer    文件:SizeBoundedQueueBenchmark.java   
@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;
  });
}
项目:buffer-slayer    文件:SizeBoundedQueueBenchmark.java   
@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;
  });
}
项目:benchmarks    文件:QueueBenchmark.java   
@Benchmark
@Group("g")
   @GroupThreads(3)
public void writing()
{
    concurrentLinkedQueue.offer("test");
}
项目:benchmarks    文件:QueueBenchmark.java   
@Benchmark
@Group("g")
   @GroupThreads(1)
public void reading()
{
    concurrentLinkedQueue.poll();
}
项目:zipkin-reporter-java    文件:ByteBoundedQueueBenchmarks.java   
@Benchmark @Group("no_contention") @GroupThreads(1)
public void no_contention_offer(OfferCounters counters) {
  if (q.offer(ONE, 1)) {
    counters.offersMade++;
  } else {
    counters.offersFailed++;
  }
}
项目:zipkin-reporter-java    文件:ByteBoundedQueueBenchmarks.java   
@Benchmark @Group("no_contention") @GroupThreads(1)
public void no_contention_drain(DrainCounters counters, ConsumerMarker cm) {
  q.drainTo((s, b) -> {
    counters.drained++;
    return true;
  }, 1000);
}
项目:zipkin-reporter-java    文件:ByteBoundedQueueBenchmarks.java   
@Benchmark @Group("mild_contention") @GroupThreads(2)
public void mild_contention_offer(OfferCounters counters) {
  if (q.offer(ONE, 1)) {
    counters.offersMade++;
  } else {
    counters.offersFailed++;
  }
}
项目:zipkin-reporter-java    文件:ByteBoundedQueueBenchmarks.java   
@Benchmark @Group("mild_contention") @GroupThreads(1)
public void mild_contention_drain(DrainCounters counters, ConsumerMarker cm) {
  q.drainTo((s, b) -> {
    counters.drained++;
    return true;
  }, 1000);
}
项目:zipkin-reporter-java    文件:ByteBoundedQueueBenchmarks.java   
@Benchmark @Group("high_contention") @GroupThreads(8)
public void high_contention_offer(OfferCounters counters) {
  if (q.offer(ONE, 1)) {
    counters.offersMade++;
  } else {
    counters.offersFailed++;
  }
}
项目:zipkin-reporter-java    文件:ByteBoundedQueueBenchmarks.java   
@Benchmark @Group("high_contention") @GroupThreads(1)
public void high_contention_drain(DrainCounters counters, ConsumerMarker cm) {
  q.drainTo((s, b) -> {
    counters.drained++;
    return true;
  }, 1000);
}
项目:resilience4j    文件:CircularBufferBenchmark.java   
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("circularBuffer")
@GroupThreads(1)
public void circularBufferAddEvent() {
    circularFifoBuffer.add(event);
}
项目:resilience4j    文件:CircularBufferBenchmark.java   
@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);
}
项目:resilience4j    文件:CircularBufferBenchmark.java   
@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);
}
项目:resilience4j    文件:CircularBufferBenchmark.java   
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("circularBuffer")
@GroupThreads(1)
public void circularBufferTakeEvent(Blackhole bh) {
    Option<Object> event = circularFifoBuffer.take();
    bh.consume(event);
}
项目:resilience4j    文件:ConcurrentEvictingQueueBenchmark.java   
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("concurrentEvictingQueue")
@GroupThreads(2)
public void concurrentEvictingQueueAdd() {
    queue.add(event);
}
项目:resilience4j    文件:ConcurrentEvictingQueueBenchmark.java   
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("concurrentEvictingQueue")
@GroupThreads(1)
public void concurrentEvictingQueueSize(Blackhole bh) {
    int size = queue.size();
    bh.consume(size);
}
项目:resilience4j    文件:ConcurrentEvictingQueueBenchmark.java   
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("concurrentEvictingQueue")
@GroupThreads(1)
public void concurrentEvictingQueuePoll(Blackhole bh) {
    Object event = queue.poll();
    bh.consume(event);
}
项目:resilience4j    文件:ConcurrentEvictingQueueBenchmark.java   
@Benchmark
@Warmup(iterations = WARMUP_COUNT)
@Fork(value = FORK_COUNT)
@Measurement(iterations = ITERATION_COUNT)
@Group("concurrentEvictingQueue")
@GroupThreads(1)
public void concurrentEvictingQueuePeek(Blackhole bh) {
    Object event = queue.peek();
    bh.consume(event);
}
项目:ignite    文件:JmhParkVsNotifyBenchmark.java   
/**
 *
 */
@Benchmark
@GroupThreads(THREAD_COUNT)
@Group("park")
public void unpark() {
    LockSupport.unpark(thread);
}
项目:ignite    文件:JmhParkVsNotifyBenchmark.java   
/**
 *
 */
@Benchmark
@Group("condition")
@GroupThreads(THREAD_COUNT)
public void notifyAll0() {
    synchronized (mux) {
        mux.notify();
    }
}
项目:jmh    文件:AbstractGroupBenchTearDownTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test() {
    Fixtures.work();
}
项目:jmh    文件:InheritGroupStateTearDownTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test(MyState state) {
    Fixtures.work();
}
项目:jmh    文件:AbstractGroupStateSetupTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test(MyState state) {
    Fixtures.work();
}
项目:jmh    文件:AbstractGroupBenchSetupTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test() {
    Fixtures.work();
}
项目:jmh    文件:InheritGroupStateSetupTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test(MyState state) {
    Fixtures.work();
}
项目:jmh    文件:InheritGroupBenchSetupTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test() {
    Fixtures.work();
}
项目:jmh    文件:InheritGroupBenchTearDownTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test() {
    Fixtures.work();
}
项目:jmh    文件:AbstractGroupStateTearDownTest.java   
@Benchmark
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test(MyState state) {
    Fixtures.work();
}
项目:jmh    文件:FailingGroupBenchSetupTest.java   
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test() {
    Fixtures.work();
}
项目:jmh    文件:FailingGroupBenchTearDownTest.java   
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test() {
    Fixtures.work();
}
项目:jmh    文件:FailingGroupBenchTest.java   
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void doTest() {
    Assert.fail();
}
项目:jmh    文件:FailingGroupStateSetupTest.java   
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test(MyState state) {
    Fixtures.work();
}
项目:jmh    文件:FailingGroupStateTearDownTest.java   
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Group("T")
@GroupThreads(4)
public void test(MyState state) {
    Fixtures.work();
}
项目:jmh    文件:ExactThreadCountTest.java   
@Benchmark
@Group("test")
@GroupThreads(1)
public void test1() {
    test1threads.add(Thread.currentThread());
    Fixtures.work();
}
项目:jmh    文件:ExactThreadCountTest.java   
@Benchmark
@Group("test")
@GroupThreads(2)
public void test2() {
    test2threads.add(Thread.currentThread());
    Fixtures.work();
}
项目:jmh    文件:Zero1ThreadCountTest.java   
@Benchmark
@Group("test")
@GroupThreads(0)
public void test1() {
    test1threads.add(Thread.currentThread());
    Fixtures.work();
}
项目:jmh    文件:Zero1ThreadCountTest.java   
@Benchmark
@Group("test")
@GroupThreads(2)
public void test2() {
    test2threads.add(Thread.currentThread());
    Fixtures.work();
}
项目:jmh    文件:Zero2ThreadCountTest.java   
@Benchmark
@Group("test")
@GroupThreads(1)
public void test1() {
    test1threads.add(Thread.currentThread());
    Fixtures.work();
}