當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。