本文整理匯總了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();
}