Commit aa6c568 1 parent 956d44d commit aa6c568 Copy full SHA for aa6c568
File tree 4 files changed +25
-2
lines changed
test/micro/org/openjdk/bench/java/lang
4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 28
28
29
29
import org .openjdk .jmh .annotations .Benchmark ;
30
30
import org .openjdk .jmh .annotations .BenchmarkMode ;
31
+ import org .openjdk .jmh .annotations .Fork ;
32
+ import org .openjdk .jmh .annotations .Measurement ;
31
33
import org .openjdk .jmh .annotations .Mode ;
32
34
import org .openjdk .jmh .annotations .OutputTimeUnit ;
35
+ import org .openjdk .jmh .annotations .Warmup ;
33
36
34
37
@ BenchmarkMode (Mode .AverageTime )
35
38
@ OutputTimeUnit (TimeUnit .NANOSECONDS )
39
+ @ Warmup (iterations = 10 , time = 1 , timeUnit = TimeUnit .SECONDS )
40
+ @ Measurement (iterations = 5 , time = 2 , timeUnit = TimeUnit .SECONDS )
41
+ @ Fork (3 )
36
42
public class Clazz {
37
43
38
44
/**
Original file line number Diff line number Diff line change 32
32
import java .security .NoSuchAlgorithmException ;
33
33
import java .security .Policy ;
34
34
import java .security .URIParameter ;
35
+ import java .util .concurrent .TimeUnit ;
35
36
37
+ import org .openjdk .jmh .annotations .Fork ;
38
+ import org .openjdk .jmh .annotations .Measurement ;
36
39
import org .openjdk .jmh .annotations .Scope ;
37
40
import org .openjdk .jmh .annotations .Setup ;
38
41
import org .openjdk .jmh .annotations .State ;
42
+ import org .openjdk .jmh .annotations .Warmup ;
39
43
40
44
/**
41
45
* Reflection benchmark
42
- *
43
- * @author sfriberg
44
46
*/
45
47
@ State (Scope .Benchmark )
48
+ @ Warmup (iterations = 10 , time = 1 , timeUnit = TimeUnit .SECONDS )
49
+ @ Measurement (iterations = 5 , time = 2 , timeUnit = TimeUnit .SECONDS )
50
+ @ Fork (3 )
46
51
public class ClazzWithSecurityManager extends Clazz {
47
52
48
53
@ SuppressWarnings ("removal" )
Original file line number Diff line number Diff line change 25
25
import org .openjdk .jmh .annotations .Benchmark ;
26
26
import org .openjdk .jmh .annotations .BenchmarkMode ;
27
27
import org .openjdk .jmh .annotations .CompilerControl ;
28
+ import org .openjdk .jmh .annotations .Fork ;
29
+ import org .openjdk .jmh .annotations .Measurement ;
28
30
import org .openjdk .jmh .annotations .Mode ;
29
31
import org .openjdk .jmh .annotations .OutputTimeUnit ;
30
32
import org .openjdk .jmh .annotations .Scope ;
31
33
import org .openjdk .jmh .annotations .Setup ;
32
34
import org .openjdk .jmh .annotations .State ;
35
+ import org .openjdk .jmh .annotations .Warmup ;
33
36
34
37
import java .lang .reflect .InvocationTargetException ;
35
38
import java .lang .reflect .Method ;
43
46
@ BenchmarkMode (Mode .AverageTime )
44
47
@ OutputTimeUnit (TimeUnit .NANOSECONDS )
45
48
@ State (Scope .Thread )
49
+ @ Warmup (iterations = 10 , time = 1 , timeUnit = TimeUnit .SECONDS )
50
+ @ Measurement (iterations = 5 , time = 2 , timeUnit = TimeUnit .SECONDS )
51
+ @ Fork (3 )
46
52
public class MethodInvoke {
47
53
48
54
private Method staticMeth_0 ;
Original file line number Diff line number Diff line change 24
24
25
25
import org .openjdk .jmh .annotations .Benchmark ;
26
26
import org .openjdk .jmh .annotations .BenchmarkMode ;
27
+ import org .openjdk .jmh .annotations .Fork ;
28
+ import org .openjdk .jmh .annotations .Measurement ;
27
29
import org .openjdk .jmh .annotations .Mode ;
28
30
import org .openjdk .jmh .annotations .OutputTimeUnit ;
29
31
import org .openjdk .jmh .annotations .Scope ;
30
32
import org .openjdk .jmh .annotations .Setup ;
31
33
import org .openjdk .jmh .annotations .State ;
34
+ import org .openjdk .jmh .annotations .Warmup ;
32
35
33
36
import java .lang .invoke .MethodHandle ;
34
37
import java .lang .invoke .MethodHandles ;
41
44
@ BenchmarkMode (Mode .AverageTime )
42
45
@ OutputTimeUnit (TimeUnit .NANOSECONDS )
43
46
@ State (Scope .Thread )
47
+ @ Warmup (iterations = 15 , time = 1 , timeUnit = TimeUnit .SECONDS )
48
+ @ Measurement (iterations = 5 , time = 2 , timeUnit = TimeUnit .SECONDS )
49
+ @ Fork (3 )
44
50
public class ObjectMethods {
45
51
record R0 () {}
46
52
record R1 (int i ) {}
You can’t perform that action at this time.
0 commit comments