mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8311178: JMH tests don't scale well when sharing output buffers
Co-authored-by: Vladimir Ivanov <vaivanov@openjdk.org> Reviewed-by: ecaspole, sviswanathan, mli
This commit is contained in:
parent
00c7f914c6
commit
a03a3a43bb
12 changed files with 17 additions and 17 deletions
|
@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
|
|||
@Fork(2)
|
||||
@Measurement(iterations = 6, time = 1)
|
||||
@Warmup(iterations=4, time = 2)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
public class DataOutputStreamTest {
|
||||
|
||||
public enum BasicType {CHAR, SHORT, INT, STRING}
|
||||
|
|
|
@ -61,7 +61,7 @@ class MyClass {
|
|||
}
|
||||
}
|
||||
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@BenchmarkMode(Mode.Throughput)
|
||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||
@Warmup(iterations = 10, time = 1)
|
||||
|
|
|
@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit;
|
|||
@Measurement(iterations = 5, time = 2)
|
||||
@Fork(3)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
public class ArrayFiddle {
|
||||
@Param("999")
|
||||
public int size;
|
||||
|
|
|
@ -53,7 +53,7 @@ import org.openjdk.jmh.infra.Blackhole;
|
|||
@Warmup(iterations = 5, time = 1)
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(3)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
public class DateTimeFormatterBench {
|
||||
|
||||
private static final TimeZone TIME_ZONE = TimeZone.getTimeZone("UTC");
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.openjdk.jmh.annotations.*;
|
|||
|
||||
@BenchmarkMode(Mode.Throughput)
|
||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@Warmup(iterations = 3, time = 1)
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(value = 1, jvmArgsPrepend = {"--add-modules=jdk.incubator.vector"})
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.openjdk.jmh.annotations.*;
|
|||
|
||||
@BenchmarkMode(Mode.Throughput)
|
||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@Warmup(iterations = 3, time = 1)
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(value = 1, jvmArgsPrepend = {"--add-modules=jdk.incubator.vector"})
|
||||
|
|
|
@ -46,7 +46,7 @@ import org.openjdk.jmh.annotations.Warmup;
|
|||
@BenchmarkMode(Mode.AverageTime)
|
||||
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
|
||||
@Measurement(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS)
|
||||
@State(org.openjdk.jmh.annotations.Scope.Benchmark)
|
||||
@State(org.openjdk.jmh.annotations.Scope.Thread)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@Fork(value = 1, jvmArgsAppend = {
|
||||
"--add-modules=jdk.incubator.vector",
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.openjdk.jmh.annotations.*;
|
|||
|
||||
@BenchmarkMode(Mode.Throughput)
|
||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@Warmup(iterations = 3, time = 1)
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(value = 1, jvmArgsPrepend = {"--add-modules=jdk.incubator.vector"})
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.openjdk.jmh.annotations.*;
|
|||
|
||||
@BenchmarkMode(Mode.Throughput)
|
||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@Warmup(iterations = 3, time = 1)
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(value = 1, jvmArgsPrepend = {"--add-modules=jdk.incubator.vector"})
|
||||
|
|
|
@ -52,17 +52,17 @@ public class VectorFPtoIntCastOperations {
|
|||
-0.0
|
||||
};
|
||||
|
||||
static float [] float_arr;
|
||||
private float [] float_arr;
|
||||
|
||||
static double [] double_arr;
|
||||
private double [] double_arr;
|
||||
|
||||
static long [] long_res;
|
||||
private long [] long_res;
|
||||
|
||||
static int [] int_res;
|
||||
private int [] int_res;
|
||||
|
||||
static short [] short_res;
|
||||
private short [] short_res;
|
||||
|
||||
static byte [] byte_res;
|
||||
private byte [] byte_res;
|
||||
|
||||
@Setup(Level.Trial)
|
||||
public void BmSetup() {
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.openjdk.jmh.annotations.Warmup;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Arrays;
|
||||
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.openjdk.jmh.annotations.*;
|
||||
|
||||
@State(Scope.Benchmark)
|
||||
@State(Scope.Thread)
|
||||
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||
@Fork(value = 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue