本文整理汇总了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();
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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());
}
示例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();
}