view src/main/java/org/openjdk/gcbench/yield/Sleeps.java @ 86:0cb1442be9d6

Fix up uninit tests
author shade
date Thu, 26 Oct 2017 17:04:09 +0200
parents 1655f5729b5a
children 583fef4276f5
line wrap: on
line source

package org.openjdk.gcbench.yield;

import org.openjdk.gcbench.tests.UnderPressureAsyncTest;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

import java.util.concurrent.TimeUnit;

@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Threads(Threads.MAX)
@State(Scope.Benchmark)
public class Sleeps extends UnderPressureAsyncTest {

    @Setup
    public void setup(Blackhole bh) {
        super.setup(bh);
    }

    @TearDown
    public void tearDown() throws InterruptedException {
        super.tearDown();
    }

    @Benchmark
    public void test() throws InterruptedException {
        Thread.sleep(1);
    }

}