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


Java Mode.All方法代码示例

本文整理汇总了Java中org.openjdk.jmh.annotations.Mode.All方法的典型用法代码示例。如果您正苦于以下问题:Java Mode.All方法的具体用法?Java Mode.All怎么用?Java Mode.All使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openjdk.jmh.annotations.Mode的用法示例。


在下文中一共展示了Mode.All方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Threads(4)
public void test(MyState state) {
    Assert.assertEquals("Run", 1, state.value);
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:10,代码来源:RaceThreadStateInvocationTest.java

示例2: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 2, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Threads(2)
public void test(MyState s) {
    Fixtures.work();
    s.visitors.add(Thread.currentThread());
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:11,代码来源:ThreadStateSharingTest.java

示例3: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Threads(1)
public void test(MyState state) {
    state.tickRun = TICKER.incrementAndGet();
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:11,代码来源:BenchmarkStateOrderTest.java

示例4: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 2, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Threads(2)
public void test(MyState state) {
    Fixtures.work();
    state.countInvocations.incrementAndGet();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:11,代码来源:BenchmarkStateHelperTimesTest.java

示例5: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
public void test() {
    tickRun = TICKER.incrementAndGet();
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:11,代码来源:GroupBenchOrderTest.java

示例6: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(0)
@Threads(1)
public void test(S1 state) {
    run = TICKER.incrementAndGet();
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:11,代码来源:BenchmarkIterationDagOrderTest.java

示例7: test1

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Fork
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
public void test1() {
    Fixtures.work();
    sameVM = true;
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:10,代码来源:ForkOverride_F_F1_Test.java

示例8: test1

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Fork(1)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
public void test1() {
    Fixtures.work();
    sameVM = true;
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:10,代码来源:ForkOverride_F1_D_Test.java

示例9: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Threads(4)
public void test() {
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:10,代码来源:FailingThreadBenchTearDownTest.java

示例10: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
public void test(MyState state) {
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:9,代码来源:ThreadStateSetupOrderTest.java

示例11: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Threads(4)
public void test(MyState state) {
    if (state.testInvocationThread == null) {
        state.testInvocationThread = Thread.currentThread();
    }
    Assert.assertEquals("test", state.testInvocationThread, Thread.currentThread());
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:14,代码来源:ThreadStateSameThreadTest.java

示例12: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
public void test(MyState state) {
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:10,代码来源:GroupStateSetupOrderTest.java

示例13: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 1, time = 1)
@Fork(1)
@Threads(4)
public void test(MyState state) {
    Fixtures.work();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:10,代码来源:FailingBenchmarkStateTearDownTest.java

示例14: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
@BenchmarkMode(Mode.All)
@Warmup(iterations = 0)
@Measurement(iterations = 2, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
@Group("T")
@GroupThreads(2)
public void test(MyState s) {
    Fixtures.work();
    s.visitors.add(Thread.currentThread());
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:12,代码来源:GroupDefaultStateSharingTest.java

示例15: test

import org.openjdk.jmh.annotations.Mode; //导入方法依赖的package包/类
@Benchmark
    @BenchmarkMode(Mode.All)
    @Warmup(iterations = 0)
    @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
    @Group("T")
    @GroupThreads(4)
    public void test(MyState state) {
       // Useless to test this condition here, intrinsic races.
//        Assert.assertEquals("Run", 1, state.value);
        Fixtures.work();
    }
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:12,代码来源:RaceGroupStateInvocationTest.java


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